GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SEARCH::XAPIAN::VALUECOUNTMATCHSPY (3)

.ds Aq ’

NAME

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

CONTENTS

SYNOPSIS



  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. Wraps Xapian::ValueCountMatchSpy

METHODS

new Constructor. Either takes no parameters, or a single valueno parameter identifying the slot.
get_total Return the total number of documents tallied.
values_begin Get an iterator over the values seen in the slot.
values_end End iterator corresponding to values_begin().
top_values_begin <maxvalues> Get an iterator over the most frequent values seen in the slot.
top_values_end <maxvalues> End iterator corresponding to top_values_begin().

SEE ALSO

Search::Xapian,Search::Xapian::MatchSpy
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XAPIAN::VALUECOUNTMATCHSPY (3) 2016-03-28

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.