KinoSearch::Search::Scorer - Score documents against a Query.
# Scorer is an abstract base class -- see MockScorer for an example
# implementation.
Scorers iterate through a list of documents, producing score/doc_num pairs for further processing, typically by a HitCollector.
my $scorer = MyScorer->SUPER::new(
similarity => $sim,
);
Abstract constructor.
Move the internal state of the scorer to the next document.
Returns: either a positive document number, or 0 (an invalid document number) when there are no more documents which match.
Skip to the first document number equal to or greater than the target. The default implementation just calls scorer_next() over and over.
Returns: either a positive document number, or 0 (an invalid document number) when there are no more documents which match.
Return the scorer's current document number. Valid only after a successful call to next() or skip_to() and must not be called otherwise.
Return a Tally containing scoring information. Valid only after a successful call to next() or skip_to() and must not be called otherwise.
KinoSearch::Search::Scorer isa KinoSearch::Obj.
Copyright 2005-2008 Marvin Humphrey
See KinoSearch version 0.20.