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, int) 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
Explain(IndexSearcher, Explanation, int)
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 | |
int | docID |
Returns
Type | Description |
---|---|
Explanation |
Rescore(IndexSearcher, TopDocs, int)
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! |
int | topN | How many re-scored hits to return |
Returns
Type | Description |
---|---|
TopDocs |