Constructor and Description |
---|
SortRescorer(Sort sort)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
Explanation |
explain(IndexSearcher searcher,
Explanation firstPassExplanation,
int docID)
Explains how the score for the specified document was
computed.
|
TopDocs |
rescore(IndexSearcher searcher,
TopDocs firstPassTopDocs,
int topN)
Rescore an initial first-pass
TopDocs . |
private final Sort sort
public SortRescorer(Sort sort)
public TopDocs rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) throws java.io.IOException
Rescorer
TopDocs
.rescore
in class Rescorer
searcher
- IndexSearcher
used 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 returnjava.io.IOException
public Explanation explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID) throws java.io.IOException
Rescorer