public abstract class Rescorer extends Object
TopDocs) from an original query. See
QueryRescorerfor an actual implementation. Typically, you run a low-cost first-pass query across the entire index, collecting the top few hundred hits perhaps, and then use this class to mix in a more costly second pass scoring.
for a simple static method to call to rescore using a 2nd
|Constructor and Description|
|Modifier and Type||Method and Description|
Explains how the score for the specified document was computed.
Rescore an initial first-pass
public abstract TopDocs rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN) throws IOException
IndexSearcherused to produce the first pass topDocs
firstPassTopDocs- 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
public abstract Explanation explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID) throws IOException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.