Package org.apache.lucene.search
Class SortRescorer
- java.lang.Object
-
- org.apache.lucene.search.Rescorer
-
- org.apache.lucene.search.SortRescorer
-
- Direct Known Subclasses:
ExpressionRescorer
public class SortRescorer extends Rescorer
ARescorerthat re-sorts according to a provided Sort.
-
-
Constructor Summary
Constructors Constructor Description SortRescorer(Sort sort)Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanationexplain(IndexSearcher searcher, Explanation firstPassExplanation, int docID)Explains how the score for the specified document was computed.TopDocsrescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)Rescore an initial first-passTopDocs.
-
-
-
Field Detail
-
sort
private final Sort sort
-
-
Constructor Detail
-
SortRescorer
public SortRescorer(Sort sort)
Sole constructor.
-
-
Method Detail
-
rescore
public TopDocs rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) throws java.io.IOException
Description copied from class:RescorerRescore an initial first-passTopDocs.- Specified by:
rescorein classRescorer- Parameters:
searcher-IndexSearcherused to produce the first pass topDocsfirstPassTopDocs- Hits from the first pass search. It's very important that these hits were produced by the provided searcher; otherwise the doc IDs will not match!topN- How many re-scored hits to return- Throws:
java.io.IOException
-
explain
public Explanation explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID) throws java.io.IOException
Description copied from class:RescorerExplains how the score for the specified document was computed.
-
-