Class SearchResponseSections

java.lang.Object
org.elasticsearch.action.search.SearchResponseSections
All Implemented Interfaces:
RefCounted

public class SearchResponseSections extends Object implements RefCounted
Holds some sections that a search response is composed of (hits, aggs, suggestions etc.) during some steps of the search response building.
  • Field Details

    • EMPTY_WITH_TOTAL_HITS

      public static final SearchResponseSections EMPTY_WITH_TOTAL_HITS
    • EMPTY_WITHOUT_TOTAL_HITS

      public static final SearchResponseSections EMPTY_WITHOUT_TOTAL_HITS
    • hits

      protected final SearchHits hits
    • aggregations

      protected final InternalAggregations aggregations
    • suggest

      protected final Suggest suggest
    • profileResults

      protected final SearchProfileResults profileResults
    • timedOut

      protected final boolean timedOut
    • terminatedEarly

      protected final Boolean terminatedEarly
    • numReducePhases

      protected final int numReducePhases
  • Constructor Details

  • Method Details

    • hits

      public final SearchHits hits()
    • suggest

      public final Suggest suggest()
    • profile

      public final Map<String,SearchProfileShardResult> profile()
      Returns the profile results for this search response (including all shards). An empty map is returned if profiling was not enabled
      Returns:
      Profile results
    • incRef

      public void incRef()
      Specified by:
      incRef in interface RefCounted
    • tryIncRef

      public boolean tryIncRef()
      Specified by:
      tryIncRef in interface RefCounted
    • decRef

      public boolean decRef()
      Specified by:
      decRef in interface RefCounted
    • hasReferences

      public boolean hasReferences()
      Specified by:
      hasReferences in interface RefCounted