Package org.elasticsearch.search.rescore
Class QueryRescorer
java.lang.Object
org.elasticsearch.search.rescore.QueryRescorer
- All Implemented Interfaces:
Rescorer
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Explanationexplain(int topLevelDocId, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext, org.apache.lucene.search.Explanation sourceExplanation)Executes anExplanationphase on the rescorer.org.apache.lucene.search.TopDocsrescore(org.apache.lucene.search.TopDocs topDocs, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext)Modifies the result of the previously executed search (TopDocs) in place based on the givenRescoreContext.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
QueryRescorer
public QueryRescorer()
-
-
Method Details
-
rescore
public org.apache.lucene.search.TopDocs rescore(org.apache.lucene.search.TopDocs topDocs, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext) throws IOExceptionDescription 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 org.apache.lucene.search.Explanation explain(int topLevelDocId, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext, org.apache.lucene.search.Explanation sourceExplanation) throws IOExceptionDescription 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
-