Catmandu::Hits - Iterable object that wraps Catmandu::Store search hits
my $store = Catmandu::Store::Solr->new(); my $hits = $store->bag->search( query => 'dna' , start => 0 , limit => 100 , sort => 'title desc', ); # Every hits is an iterator... $hits->each(sub { ... }); printf "Found %s $hits\n" , $hits->total; my $start = $hits->start; my $limit = $hits->limit; my $prev = $hits->previous_page; my $next = $hits->next_page;
Returns the total number of hits matching the query.
Returns the start index for the search results.
Returns the maximum number of search results returned.
Return true if there are more search results.
Catmandu::Iterable, Catmandu::Bag, Catmandu::Searchable, Catmandu::Store, Catmandu::Pager
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.