java.lang.Object
org.elasticsearch.action.search.RankFeaturePhase
This search phase is responsible for executing any re-ranking needed for the given search request, iff that is applicable.
It starts by retrieving
num_shards * rank_window_size results from the query phase and reduces them to a global list of
the top rank_window_size results. It then reaches out to the shards to extract the needed feature data,
and finally passes all this information to the appropriate RankFeatureRankCoordinatorContext which is responsible for reranking
the results. If no rank query is specified, it proceeds directly to the next phase (FetchSearchPhase) by first reducing the results.-
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoCheckNoMissingShards(String phaseName, SearchRequest request, GroupShardsIterator<SearchShardIterator> shardsIts) protected static voiddoCheckNoMissingShards(String phaseName, SearchRequest request, GroupShardsIterator<SearchShardIterator> shardsIts, Function<StringBuilder, String> makeErrorMessage) getName()Returns the phases name.protected static StringmakeMissingShardsError(StringBuilder missingShards) protected StringmissingShardsErrorMessage(StringBuilder missingShards) protected static voidreleaseIrrelevantSearchContext(SearchPhaseResult searchPhaseResult, org.elasticsearch.action.search.AbstractSearchAsyncAction<?> context) Releases shard targets that are not used in the docsIdsToLoad.protected voidrun()
-
Method Details
-
run
protected void run() -
getName
Returns the phases name. -
missingShardsErrorMessage
-
makeMissingShardsError
-
doCheckNoMissingShards
protected void doCheckNoMissingShards(String phaseName, SearchRequest request, GroupShardsIterator<SearchShardIterator> shardsIts) -
doCheckNoMissingShards
protected static void doCheckNoMissingShards(String phaseName, SearchRequest request, GroupShardsIterator<SearchShardIterator> shardsIts, Function<StringBuilder, String> makeErrorMessage) -
releaseIrrelevantSearchContext
protected static void releaseIrrelevantSearchContext(SearchPhaseResult searchPhaseResult, org.elasticsearch.action.search.AbstractSearchAsyncAction<?> context) Releases shard targets that are not used in the docsIdsToLoad.
-