Xapian::ValueCountMatchSpy(3pm) | User Contributed Perl Documentation | Xapian::ValueCountMatchSpy(3pm) |
Search::Xapian::ValueCountMatchSpy - Class for counting the frequencies of values in the matching documents.
use Search::Xapian qw(:all); my $db = Search::Xapian::Database->new( '[DATABASE DIR]' ); my $enq = $db->enquire( '[QUERY TERM]' ); my $spy = Search::Xapian::ValueCountMatchSpy->new(0); $enq->add_matchspy($spy); my $mset = $enq->get_mset(0, 10, 10000); print "Match spy registered " . $spy->get_total() . " documents\n"; my $end = $spy->values_end(); for (my $it = $spy->values_begin(); $it != $end; $it++) { print $it->get_termname() . " - " . $it->get_termfreq(); }
Class for counting the frequencies of values in the matching documents. Wraps Xapian::ValueCountMatchSpy
Search::Xapian, Search::Xapian::MatchSpy
2022-11-23 | perl v5.36.0 |