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 class
QueryRescorer.QueryRescoreContext
-
Constructor Summary
Constructors Constructor Description QueryRescorer()
-
Method Summary
Modifier and Type Method Description org.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 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.IOException
Description 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:
java.io.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 java.io.IOException
Description 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:
java.io.IOException
- if anIOException
occurs
-
-