Save This Page
Home » lucene-2.4.1-src » org.apache » lucene » search » [javadoc | source]
org.apache.lucene.search
abstract public class: Scorer [javadoc | source]
java.lang.Object
   org.apache.lucene.search.DocIdSetIterator
      org.apache.lucene.search.Scorer

Direct Known Subclasses:
    TermScorer, NonMatchingScorer, ReqOptSumScorer, MatchAllScorer, SpanScorer, ReqExclScorer, DisjunctionSumScorer, PhraseScorer, CustomScorer, SloppyPhraseScorer, ConjunctionScorer, BoostingSpanScorer, DisjunctionMaxScorer, BooleanScorer2, SingleMatchScorer, ConstantScorer, ExactPhraseScorer, ValueSourceScorer

Expert: Common scoring functionality for different types of queries.

A Scorer either iterates over documents matching a query in increasing order of doc Id, or provides an explanation of the score for a query for a given document.

Document scores are computed using a given Similarity implementation.

Constructor:
 protected Scorer(Similarity similarity) 
    Constructs a Scorer.
    Parameters:
    similarity - The Similarity implementation used by this scorer.
Method from org.apache.lucene.search.Scorer Summary:
explain,   getSimilarity,   score,   score,   score
Methods from org.apache.lucene.search.DocIdSetIterator:
doc,   next,   skipTo
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.Scorer Detail:
 abstract public Explanation explain(int doc) throws IOException
 public Similarity getSimilarity() 
    Returns the Similarity implementation used by this scorer.
 abstract public float score() throws IOException
    Returns the score of the current document matching the query. Initially invalid, until #next() or #skipTo(int) is called the first time.
 public  void score(HitCollector hc) throws IOException 
    Scores and collects all matching documents.
 protected boolean score(HitCollector hc,
    int max) throws IOException 
    Expert: Collects matching documents in a range. Hook for optimization. Note that #next() must be called once before this method is called for the first time.