Rechercher une page de manuel
Plucene::Search::HitCollector.3pm
Langue: en
Version: 2005-09-05 (ubuntu - 08/07/09)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
Plucene::Search::HitCollectorSYNOPSIS
# 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 HitCollector 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 document number and its score.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre