1Xapian::ValueCountMatchUSspeyr(3C)ontributed Perl DocumeXnatpaitaino:n:ValueCountMatchSpy(3)
2
3
4

NAME

6       Search::Xapian::ValueCountMatchSpy - Class for counting the frequencies
7       of values in the matching documents.
8

SYNOPSIS

10         use Search::Xapian qw(:all);
11
12         my $db = Search::Xapian::Database->new( '[DATABASE DIR]' );
13         my $enq = $db->enquire( '[QUERY TERM]' );
14         my $spy = Search::Xapian::ValueCountMatchSpy->new(0);
15         $enq->add_matchspy($spy);
16         my $mset = $enq->get_mset(0, 10, 10000);
17
18         print "Match spy registered " . $spy->get_total() . " documents\n";
19
20         my $end = $spy->values_end();
21         for (my $it = $spy->values_begin(); $it != $end; $it++) {
22           print $it->get_termname() . " - " . $it->get_termfreq();
23         }
24

DESCRIPTION

26       Class for counting the frequencies of values in the matching documents.
27       Wraps Xapian::ValueCountMatchSpy
28

METHODS

30       new Constructor. Either takes no parameters, or a single valueno
31           parameter identifying the slot.
32
33       get_total
34           Return the total number of documents tallied.
35
36       values_begin
37           Get an iterator over the values seen in the slot.
38
39       values_end
40           End iterator corresponding to values_begin().
41
42       top_values_begin <maxvalues>
43           Get an iterator over the most frequent values seen in the slot.
44
45       top_values_end <maxvalues>
46           End iterator corresponding to top_values_begin().
47

SEE ALSO

49       Search::Xapian, Search::Xapian::MatchSpy
50
51
52
53perl v5.30.1                      2020-01-30     Xapian::ValueCountMatchSpy(3)
Impressum