FileDocCategorySizeDatePackage
TopDocs.javaAPI DocApache Lucene 2.1.01760Wed Feb 14 10:46:40 GMT 2007org.apache.lucene.search

TopDocs

public class TopDocs extends Object implements Serializable
Expert: Returned by low-level search implementations.
see
Searcher#search(Query,Filter,int)

Fields Summary
public int
totalHits
Expert: The total number of hits for the query.
public ScoreDoc[]
scoreDocs
Expert: The top hits for the query.
private float
maxScore
Expert: Stores the maximum score value encountered, needed for normalizing.
Constructors Summary
TopDocs(int totalHits, ScoreDoc[] scoreDocs, float maxScore)
Expert: Constructs a TopDocs.

    this.totalHits = totalHits;
    this.scoreDocs = scoreDocs;
    this.maxScore = maxScore;
  
Methods Summary
public floatgetMaxScore()
Expert: Returns the maximum score value encountered.

      return maxScore;
  
public voidsetMaxScore(float maxScore)
Expert: Sets the maximum score value encountered.

      this.maxScore=maxScore;