Module org.elasticsearch.server
Class QueryPhaseRankCoordinatorContext
java.lang.Object
org.elasticsearch.search.rank.context.QueryPhaseRankCoordinatorContext
- Direct Known Subclasses:
RerankingQueryPhaseRankCoordinatorContext
QueryPhaseRankCoordinatorContext is running on the coordinator node and is
responsible for combining the query phase results from the shards and rank them accordingly.
The output is a `rank_window_size` ranked list of ordered results from all shards.
Note: Currently this can use only sort by score; sort by field is not supported.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.apache.lucene.search.ScoreDoc[]rankQueryPhaseResults(List<QuerySearchResult> querySearchResults, SearchPhaseController.TopDocsStats topDocStats) This is used to pull information passed back from the shards as part ofQuerySearchResult.getRankShardResult()and return aScoreDocof the `rank_window_size` ranked results.
-
Field Details
-
rankWindowSize
protected final int rankWindowSize
-
-
Constructor Details
-
QueryPhaseRankCoordinatorContext
public QueryPhaseRankCoordinatorContext(int rankWindowSize)
-
-
Method Details
-
rankQueryPhaseResults
public abstract org.apache.lucene.search.ScoreDoc[] rankQueryPhaseResults(List<QuerySearchResult> querySearchResults, SearchPhaseController.TopDocsStats topDocStats) This is used to pull information passed back from the shards as part ofQuerySearchResult.getRankShardResult()and return aScoreDocof the `rank_window_size` ranked results. Note thatSearchPhaseController.TopDocsStatsis included so that appropriate stats may be updated based on rank results. This is called when reducing query results throughSearchPhaseController#reducedQueryPhase().
-