Pangloss::Search - search through Pangloss Terms.
use Pangloss::Search; my $search = new Pangloss::Search; $search->terms( $terms->clone ) ->categories( $categories ) ->concepts( $concepts ) ->languages( $languages ) ->users( $users ); $search->add_filters( @filters ); $search->apply; $results = $search->results;
Search through a collection of Pangloss::Terms.
TODO: document other API methods.
Note: the $obj->terms collection gets modified, so you should consider cloning it before handing it over... individual terms that end up in the result set are cloned, so you don't have to worry about doing a deep_clone().
- $obj = $obj->apply( [ $mode ] )
The results will contain all terms that match the filters (ie: those where $filter->applies_to( $term ) evaluates to
The $mode argument is a set-theory switch that affects how terms will be added to the result set. It defaults to 'intersect', but may also be set to 'union'.
Note that collection of terms will be modified - this means you should give a shallow copy of the terms to search objects.
Steve Purkis <email@example.com>