The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

SYNOPSIS

my $search = Some::Model::Package->createSearch('puppies');

#multiple filters broaden the selection - we'll match #brown OR grey pets $search->addFilter('color', $brown); $search->addFilter('size', $grey);

# must be used only on fields that were set to be stored and vectorized # the hits will now have an "excerpt" key with html bolded matches $search->setExcerptField('body');

my $hit_iter = $search->getHits()->iterator(); #all hits #or my $hit_iter = $search->getHits(0,9)->iterator(); #first ten hits

while( my $hit = $hit_iter->next() ){ ... }

addFilter ($field, $value)

Requires hits to match the given value in the given field.

Multiple filters can be added - only one has to match.

setExcerptField ($field_name)

Causes the hits to include an 'excerpt' key that contains a snippet of the searched text with the matches wrapped in HTML bold tags.

This must only be called for fields that were set to be vectorized and stored.

getHits ([$first, $last])

Returns a Solstice::List of hits. The optional first/last params will cause a subset of the hits to be returned.

encode

This is here to short-circuit the search libraries attempt to encode html entities. It is a no-op.

COPYRIGHT

Copyright 1998-2007 Office of Learning Technologies, University of Washington

Licensed under the Educational Community License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.opensource.org/licenses/ecl1.php

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.