1Lucy::Search::Hits(3) User Contributed Perl DocumentationLucy::Search::Hits(3)
2
3
4

NAME

6       Lucy::Search::Hits - Access search results.
7

SYNOPSIS

9           my $hits = $searcher->hits(
10               query      => $query,
11               offset     => 0,
12               num_wanted => 10,
13           );
14           while ( my $hit = $hits->next ) {
15               print "<p>$hit->{title} <em>" . $hit->get_score . "</em></p>\n";
16           }
17

DESCRIPTION

19       Hits objects are iterators used to access the results of a search.
20

METHODS

22   next
23           my $hit_doc = $hits->next();
24
25       Return the next hit, or undef when the iterator is exhausted.
26
27   total_hits
28           my $int = $hits->total_hits();
29
30       Return the total number of documents which matched the Query used to
31       produce the Hits object.  Note that this is the total number of
32       matches, not just the number of matches represented by the Hits
33       iterator.
34

INHERITANCE

36       Lucy::Search::Hits isa Clownfish::Obj.
37
38
39
40perl v5.32.0                      2020-07-28             Lucy::Search::Hits(3)
Impressum