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
Modifier and Type Method Description org.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 Detail
-
INSTANCE
public static final Rescorer INSTANCE
-
-
Method Detail
-
rescore
public org.apache.lucene.search.TopDocs rescore(org.apache.lucene.search.TopDocs topDocs, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext) throws java.io.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:
java.io.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 java.io.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:
java.io.IOException- if anIOExceptionoccurs
-
-