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().
Applies the filters to the Pangloss::Terms, and returns this object. Results are accessible via $obj->results() (a Pangloss::Search::Results object).
The results will contain all terms that match the filters (ie: those where $filter->applies_to( $term ) evaluates to true).
true
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 <spurkis@quiup.com>
Pangloss, Pangloss::Search::Request, Pangloss::Search::Results, Pangloss::Search::Filters,
To install Pangloss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pangloss
CPAN shell
perl -MCPAN -e shell install Pangloss
For more information on module installation, please visit the detailed CPAN module installation guide.