Save This Page
Home » lucene-3.0.1-src » org.apache » lucene » search » [javadoc | source]
org.apache.lucene.search
public class: TopDocs [javadoc | source]
java.lang.Object
   org.apache.lucene.search.TopDocs

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    TopFieldDocs

Represents hits returned by Searcher#search(Query,Filter,int) and Searcher#search(Query,int) .
Field Summary
public  int totalHits    The total number of hits for the query. 
public  ScoreDoc[] scoreDocs    The top hits for the query. 
Constructor:
 TopDocs(int totalHits,
    ScoreDoc[] scoreDocs) 
    Constructs a TopDocs with a default maxScore=Float.NaN.
 public TopDocs(int totalHits,
    ScoreDoc[] scoreDocs,
    float maxScore) 
Method from org.apache.lucene.search.TopDocs Summary:
getMaxScore,   setMaxScore
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.lucene.search.TopDocs Detail:
 public float getMaxScore() 
    Returns the maximum score value encountered. Note that in case scores are not tracked, this returns Float#NaN .
 public  void setMaxScore(float maxScore) 
    Sets the maximum score value encountered.