Comrite Unix Man page/Perldoc/Info page, English-Chinese Dictionary, Chinese-English Dictionary

Plucene::Search::HitCollector

Command: man perldoc info search(apropos)  


 
Plucene::Search::HitCoUsertContributed Perl Plucene::Search::HitCollector(3pm)



NAME
       Plucene::Search::HitCollector

SYNOPSIS
               # used in conjunction with the IndexSearcher

               my $searcher = Plucene::Search::IndexSearcher->new($DIRECTORY);

               my $hc = Plucene::Search::HitCollector->new( collect =>
                       sub {
                               my ($self, $doc, $score) = @_;
                               ...
               });

               $searcher->search_hc($QUERY, $hc);

DESCRIPTION
       This is used in conjunction with the IndexSearcher, in that whenever a
       non-zero scoring document is found, the subref with with the HitCollec-
       tor was made will get called.

METHODS
       new

               my $hc = Plucene::Search::HitCollector->new( collect =>
                       sub {
                               my ($self, $doc, $score) = @_;
                               ...
               });

       This will create a new Plucene::Search::HitCollector with the passed
       subref.

       collect

       This is called once for every non-zero scoring document, with the docu-
       ment number and its score.



perl v5.8.8                       2005-09-05Plucene::Search::HitCollector(3pm)
 

©2005 Comrite