public interface Rescorer
| Modifier and Type | Method and Description |
|---|---|
org.apache.lucene.search.Explanation |
explain(int topLevelDocId,
SearchContext context,
RescoreSearchContext rescoreContext,
org.apache.lucene.search.Explanation sourceExplanation)
Executes an
Explanation phase on the rescorer. |
void |
extractTerms(SearchContext context,
RescoreSearchContext rescoreContext,
Set<org.apache.lucene.index.Term> termsSet)
Extracts all terms needed to exectue this
Rescorer. |
String |
name()
Returns the name of this rescorer
|
RescoreSearchContext |
parse(XContentParser parser,
SearchContext context)
Parses the
RescoreSearchContext for this impelementation |
org.apache.lucene.search.TopDocs |
rescore(org.apache.lucene.search.TopDocs topDocs,
SearchContext context,
RescoreSearchContext rescoreContext)
Modifies the result of the previously executed search (
TopDocs)
in place based on the given RescoreSearchContext. |
String name()
org.apache.lucene.search.TopDocs rescore(org.apache.lucene.search.TopDocs topDocs,
SearchContext context,
RescoreSearchContext rescoreContext)
throws IOException
TopDocs)
in place based on the given RescoreSearchContext.topDocs - the result of the previously exectued searchcontext - the current SearchContext. This will never be null.rescoreContext - the RescoreSearchContext. This will never be nullIOException - if an IOException occurs during rescoringorg.apache.lucene.search.Explanation explain(int topLevelDocId,
SearchContext context,
RescoreSearchContext rescoreContext,
org.apache.lucene.search.Explanation sourceExplanation)
throws IOException
Explanation phase on the rescorer.topLevelDocId - the global / top-level document ID to explaincontext - the explanation for the results being fed to this rescorerrescoreContext - context for this rescorersourceExplanation - explanation of the source of the documents being fed into this rescoreIOException - if an IOException occursRescoreSearchContext parse(XContentParser parser, SearchContext context) throws IOException
RescoreSearchContext for this impelementationparser - the parser to read the context fromcontext - the current search contextRescoreSearchContextIOException - if an IOException occurs while parsing the contextvoid extractTerms(SearchContext context, RescoreSearchContext rescoreContext, Set<org.apache.lucene.index.Term> termsSet)
Rescorer. This method
is executed in a distributed frequency collection roundtrip for
SearchType.DFS_QUERY_AND_FETCH and
SearchType.DFS_QUERY_THEN_FETCHCopyright © 2009–2017. All rights reserved.