org.apache.lucene.search
Class ScoreDoc

java.lang.Object
  extended by org.apache.lucene.search.ScoreDoc
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FieldDoc, FieldValueHitQueue.Entry

public class ScoreDoc
extends Object
implements Serializable

Holds one hit in TopDocs.

See Also:
Serialized Form

Field Summary
 int doc
          Expert: A hit document's number.
 float score
          The score of this document for the query.
 int shardIndex
          Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])
 
Constructor Summary
ScoreDoc(int doc, float score)
          Constructs a ScoreDoc.
ScoreDoc(int doc, float score, int shardIndex)
          Constructs a ScoreDoc.
 
Method Summary
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

score

public float score
The score of this document for the query.


doc

public int doc
Expert: A hit document's number.

See Also:
Searcher.doc(int)

shardIndex

public int shardIndex
Only set by TopDocs.merge(org.apache.lucene.search.Sort, int, org.apache.lucene.search.TopDocs[])

Constructor Detail

ScoreDoc

public ScoreDoc(int doc,
                float score)
Constructs a ScoreDoc.


ScoreDoc

public ScoreDoc(int doc,
                float score,
                int shardIndex)
Constructs a ScoreDoc.

Method Detail

toString

public String toString()
Overrides:
toString in class Object


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