Class SearchPhaseController

  • public final class SearchPhaseController
    extends java.lang.Object
    • Constructor Detail

      • SearchPhaseController

        public SearchPhaseController​(java.util.function.Function<java.lang.Boolean,​InternalAggregation.ReduceContext> reduceContextFunction)
        reduceContextFunction - A function that builds a context for the reduce of an InternalAggregation
    • Method Detail

      • fillDocIdsToLoad

        public com.carrotsearch.hppc.IntArrayList[] fillDocIdsToLoad​(int numShards,
                                                           [] shardDocs)
        Builds an array, with potential null elements, with docs to load.
      • merge

        public InternalSearchResponse merge​(boolean ignoreFrom,
                                            SearchPhaseController.ReducedQueryPhase reducedQueryPhase,
                                            java.util.Collection<? extends SearchPhaseResult> fetchResults,
                                            java.util.function.IntFunction<SearchPhaseResult> resultsLookup)
        Enriches search hits and completion suggestion hits from sortedDocs using fetchResultsArr, merges suggestions, aggregations and profile results Expects sortedDocs to have top search docs across all shards, optionally followed by top suggest docs for each named completion suggestion ordered by suggestion name