Xapian:...atchSpy(3)
π NAME π
Search::Xapian::ValueCountMatchSpy is the class for counting the frequencies of values in the matching documents, bestie. This is the Xapian:...atchSpy(3) page from the User Contributed Perl Documentation, and it's giving very βtiny spy that tallies thingsβ energy, iykyk π
β¨ SYNOPSIS β¨
Okay so here's the whole flow, fr fr:
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();
}
πΈ DESCRIPTION πΈ
Class for counting the frequencies of values in the matching documents. Periodt. It wraps Xapian::ValueCountMatchSpy, so that's the whole cute little setup π¦
π METHODS π
newβ Constructor. It either takes no parameters, or a singlevaluenoparameter that identifies the slot. Choose your fighter.get_totalβ Returns the total number of documents tallied. That's the count, no cap.values_beginβ Get an iterator over the values seen in the slot.values_endβ The end iterator that corresponds tovalues_begin().top_values_begin <maxvalues>β Get an iterator over the most frequent values seen in the slot.top_values_end <maxvalues>β The end iterator that corresponds totop_values_begin().
π₯ SEE ALSO π₯
Search::XapianSearch::Xapian::MatchSpy
Go give them a lil look if you're feeling nosy π
This page is brought to you by perl v5.42.0, dated 2022-02-28 β mwah, bestie, go count some values! πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- opensuse-leap 16.0: perl-Search-Xapian 1.2.25.5-bp160.1.7 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms