Package org.elasticsearch.search.rescore
Class QueryRescorer
- java.lang.Object
-
- org.elasticsearch.search.rescore.QueryRescorer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueryRescorer.QueryRescoreContext
-
Constructor Summary
Constructors Constructor Description QueryRescorer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Explanationexplain(int topLevelDocId, IndexSearcher searcher, RescoreContext rescoreContext, Explanation sourceExplanation)Executes anExplanationphase on the rescorer.TopDocsrescore(TopDocs topDocs, IndexSearcher searcher, RescoreContext rescoreContext)Modifies the result of the previously executed search (TopDocs) in place based on the givenRescoreContext.
-
-
-
Field Detail
-
INSTANCE
public static final Rescorer INSTANCE
-
-
Method Detail
-
rescore
public TopDocs rescore(TopDocs topDocs, IndexSearcher searcher, RescoreContext rescoreContext) throws IOException
Description copied from interface:RescorerModifies the result of the previously executed search (TopDocs) in place based on the givenRescoreContext.- Specified by:
rescorein interfaceRescorer- Parameters:
topDocs- the result of the previously executed searchsearcher- the searcher used for this search. This will never benull.rescoreContext- theRescoreContext. This will never benull- Throws:
IOException- if anIOExceptionoccurs during rescoring
-
explain
public Explanation explain(int topLevelDocId, IndexSearcher searcher, RescoreContext rescoreContext, Explanation sourceExplanation) throws IOException
Description copied from interface:RescorerExecutes anExplanationphase on the rescorer.- Specified by:
explainin interfaceRescorer- Parameters:
topLevelDocId- the global / top-level document ID to explainsearcher- the searcher used for this search. This will never benull.rescoreContext- context for this rescorersourceExplanation- explanation of the source of the documents being fed into this rescore- Returns:
- the explain for the given top level document ID.
- Throws:
IOException- if anIOExceptionoccurs
-
-