Module org.elasticsearch.server
Class RerankingQueryPhaseRankCoordinatorContext
java.lang.Object
org.elasticsearch.search.rank.context.QueryPhaseRankCoordinatorContext
org.elasticsearch.search.rank.rerank.RerankingQueryPhaseRankCoordinatorContext
The
RerankingQueryPhaseRankCoordinatorContext provides the main functionality for sorting the initial query phase results
based on their score, and trim them down to a global `rank_window_size`-sized list. These results could later be sent to each
of the shards to execute the RankFeatureShardPhase shard phase, and then they will be merged and ranked again
as part of the RankFeaturePhaseRankCoordinatorContext.-
Field Summary
Fields inherited from class org.elasticsearch.search.rank.context.QueryPhaseRankCoordinatorContext
rankWindowSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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.
-
Constructor Details
-
RerankingQueryPhaseRankCoordinatorContext
public RerankingQueryPhaseRankCoordinatorContext(int windowSize)
-
-
Method Details
-
rankQueryPhaseResults
public org.apache.lucene.search.ScoreDoc[] rankQueryPhaseResults(List<QuerySearchResult> querySearchResults, SearchPhaseController.TopDocsStats topDocStats) Description copied from class:QueryPhaseRankCoordinatorContextThis 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().- Specified by:
rankQueryPhaseResultsin classQueryPhaseRankCoordinatorContext
-