Catmandu::Searchable - Optional role for searchable stores
my $store = Catmandu::Store::Solr->new(); # Return one page of search results (page size = 1000) my $hits = $store->bag->search( query => 'dna' , start => 0 , limit => 100 , sort => 'title desc', ); # Return all the search results as iterator my $it = $store->bag->searcher(query => 'dna'); $it->each(sub { ...}); $store->bag->delete_by_query(query => 'dna');
Search the database and returns a Catmandu::Hits on success. The Hits represents one result page of at most $num results. The $query and $sort should implement the query and sort syntax of the underlying search engine.
Optionally provide the index of the first result using the start option, or the starting page using the page option. The number of records in a result page can be set using the limit option. Sorting options are being sent verbatim to the underlying search engine.
start
page
limit
Search the database and return a Catmandu::Iterable on success. This iterator can be used to loop over the complete result set. The $query and $sort should implement the query and sort syntax of the underlying search engine.
Optionally provide the index of the first result using the start option. The number of records in a page can be set using the limit option. Sorting options are being sent verbatim to the underlying search engine.
Delete items from the database that match $query
Catmandu::Hits, Catmandu::Paged
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.