Class RankFeaturePhase

java.lang.Object
org.elasticsearch.action.search.RankFeaturePhase
All Implemented Interfaces:
CheckedRunnable<IOException>

public class RankFeaturePhase extends Object
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 Details

    • run

      public void run()
    • getName

      public String getName()
      Returns the phases name.
    • start

      public void start()
    • missingShardsErrorMessage

      protected String missingShardsErrorMessage(StringBuilder missingShards)
    • doCheckNoMissingShards

      protected void doCheckNoMissingShards(String phaseName, SearchRequest request, GroupShardsIterator<SearchShardIterator> shardsIts)
    • releaseIrrelevantSearchContext

      protected static void releaseIrrelevantSearchContext(SearchPhaseResult searchPhaseResult, org.elasticsearch.action.search.AbstractSearchAsyncAction<?> context)
      Releases shard targets that are not used in the docsIdsToLoad.