FileDocCategorySizeDatePackage
TopDocs.javaAPI DocApache Lucene 1.91572Mon Feb 20 09:20:04 GMT 2006org.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;