Class Rescorer
Re-scores the topN results (TopDocs) from an original query. See QueryRescorer for 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.
See Rescore(IndexSearcher, TopDocs, Query, Double, Int32) for a simple static method to call to rescore using a 2nd pass Query.
Note
This API is experimental and might change in incompatible ways in the next release.
Inherited Members
Namespace: Lucene.Net.Search
Assembly: Lucene.Net.dll
Syntax
public abstract class Rescorer
Methods
| Improve this Doc View SourceExplain(IndexSearcher, Explanation, Int32)
Explains how the score for the specified document was computed.
Declaration
public abstract Explanation Explain(IndexSearcher searcher, Explanation firstPassExplanation, int docID)
Parameters
Type | Name | Description |
---|---|---|
IndexSearcher | searcher | |
Explanation | firstPassExplanation | |
System.Int32 | docID |
Returns
Type | Description |
---|---|
Explanation |
Rescore(IndexSearcher, TopDocs, Int32)
Rescore an initial first-pass TopDocs.
Declaration
public abstract TopDocs Rescore(IndexSearcher searcher, TopDocs firstPassTopDocs, int topN)
Parameters
Type | Name | Description |
---|---|---|
IndexSearcher | searcher | IndexSearcher used to produce the first pass topDocs |
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! |
System.Int32 | topN | How many re-scored hits to return |
Returns
Type | Description |
---|---|
TopDocs |