org.apache.lucene.search
Class Scorer

java.lang.Object
  extended byorg.apache.lucene.search.Scorer

public abstract class Scorer
extends Object

Expert: Implements scoring for a class of queries.


Constructor Summary
protected Scorer(Similarity similarity)
          Constructs a Scorer.
 
Method Summary
abstract  Explanation explain(int doc)
          Returns an explanation of the score for doc.
 Similarity getSimilarity()
          Returns the Similarity implementation used by this scorer.
abstract  void score(HitCollector hc, int maxDoc)
          Scores hits and passes them to a collector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Scorer

protected Scorer(Similarity similarity)
Constructs a Scorer.

Method Detail

getSimilarity

public Similarity getSimilarity()
Returns the Similarity implementation used by this scorer.


score

public abstract void score(HitCollector hc,
                           int maxDoc)
                    throws IOException
Scores hits and passes them to a collector. Stops at the last document before maxDoc. If called repeatedly, will restart at point where it last left off.

Throws:
IOException

explain

public abstract Explanation explain(int doc)
                             throws IOException
Returns an explanation of the score for doc.

Throws:
IOException


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.