KinoSearch::Searcher - execute searches
my $analyzer = KinoSearch::Analysis::PolyAnalyzer->new( language => 'en', ); my $searcher = KinoSearch::Searcher->new( invindex => $invindex, analyzer => $analyzer, ); my $hits = $searcher->search('foo bar');
Use the Searcher class to perform queries against an invindex.
my $searcher = KinoSearch::Searcher->new( invindex => $invindex, analyzer => $analyzer, );
Constructor. Takes two labeled parameters, both of which are required.
invindex - can be either a path to an invindex, or a KinoSearch::Store::InvIndex object.
analyzer - An object which subclasses KinoSearch::Analysis::Analyer, such as a PolyAnalyzer.
my $hits = $searcher->search("foo bar"); # or... my $hits = $searcher->search( query => $query );
Process a search and return a Hits object.
If only a single argument is supplied to search, the Searcher will feed the text to QueryParser, and search against all of the invindex's indexed fields.
If multiple arguments are fed to search, the searcher will treat them as labeled hash-style parameters.
query - An object which subclasses KinoSearch::Search::Query.
Copyright 2005-2006 Marvin Humphrey
See KinoSearch version 0.05.
To install KinoSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KinoSearch
CPAN shell
perl -MCPAN -e shell install KinoSearch
For more information on module installation, please visit the detailed CPAN module installation guide.