Plucene::Search::HitCollector(3pm)

Plucene::Search::HitCollector3pm

Usage

        # 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);

Overview

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.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0
  4. 7–9
  5. 10–11
  6. 12–13

From libplucene-perl 1.25-5 in Debian 13 (Trixie). Parsed by carta from the page's man source.