Module org.elasticsearch.server
Package org.elasticsearch.action.search
Class SearchResponseSections
java.lang.Object
org.elasticsearch.action.search.SearchResponseSections
- All Implemented Interfaces:
Closeable,AutoCloseable,Releasable
Holds some sections that a search response is composed of (hits, aggs, suggestions etc.) during some steps of the search response
building.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InternalAggregationsstatic final SearchResponseSectionsstatic final SearchResponseSectionsprotected final SearchHitsprotected final intprotected final SearchProfileResultsprotected final Suggestprotected final Booleanprotected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionSearchResponseSections(SearchHits hits, InternalAggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileResults profileResults, int numReducePhases) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final SearchHitshits()final Map<String, SearchProfileShardResult> profile()Returns the profile results for this search response (including all shards).final Suggestsuggest()
-
Field Details
-
EMPTY_WITH_TOTAL_HITS
-
EMPTY_WITHOUT_TOTAL_HITS
-
hits
-
aggregations
-
suggest
-
profileResults
-
timedOut
protected final boolean timedOut -
terminatedEarly
-
numReducePhases
protected final int numReducePhases
-
-
Constructor Details
-
SearchResponseSections
public SearchResponseSections(SearchHits hits, InternalAggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileResults profileResults, int numReducePhases)
-
-
Method Details
-
hits
-
suggest
-
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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceReleasable
-