Package org.elasticsearch.search.rescore
Class QueryRescorer
java.lang.Object
org.elasticsearch.search.rescore.QueryRescorer
- All Implemented Interfaces:
Rescorer
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Explanation
explain(int topLevelDocId, org.apache.lucene.search.IndexSearcher searcher, RescoreContext rescoreContext, org.apache.lucene.search.Explanation sourceExplanation)
Executes anExplanation
phase on the rescorer.org.apache.lucene.search.TopDocs
rescore(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:Rescorer
Modifies the result of the previously executed search (TopDocs
) in place based on the givenRescoreContext
.- Specified by:
rescore
in 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 anIOException
occurs 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:Rescorer
Executes anExplanation
phase on the rescorer.- Specified by:
explain
in 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 anIOException
occurs
-