Package org.elasticsearch.action.search
Class SearchResponseSections
java.lang.Object
org.elasticsearch.action.search.SearchResponseSections
- All Implemented Interfaces:
- org.elasticsearch.common.xcontent.ToXContent,- org.elasticsearch.common.xcontent.ToXContentFragment
- Direct Known Subclasses:
- InternalSearchResponse
public class SearchResponseSections
extends Object
implements org.elasticsearch.common.xcontent.ToXContentFragment
Base class that holds the various sections which a search response is
 composed of (hits, aggs, suggestions etc.) and allows to retrieve them.
 The reason why this class exists is that the high level REST client uses its own classes
 to parse aggregations into, which are not serializable. This is the common part that can be
 shared between core and client.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContentorg.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Aggregationsprotected SearchHitsprotected intprotected SearchProfileShardResultsprotected Suggestprotected Booleanprotected booleanFields inherited from interface org.elasticsearch.common.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructorsConstructorDescriptionSearchResponseSections(SearchHits hits, Aggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileShardResults profileResults, int numReducePhases)
- 
Method SummaryModifier and TypeMethodDescriptionintReturns the number of reduce phases applied to obtain this search responsehits()profile()Returns the profile results for this search response (including all shards).suggest()booleantimedOut()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)protected voidwriteTo(StreamOutput out)Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
hits
- 
aggregations
- 
suggest
- 
profileResults
- 
timedOutprotected final boolean timedOut
- 
terminatedEarly
- 
numReducePhasesprotected final int numReducePhases
 
- 
- 
Constructor Details- 
SearchResponseSectionspublic SearchResponseSections(SearchHits hits, Aggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileShardResults profileResults, int numReducePhases)
 
- 
- 
Method Details- 
timedOutpublic final boolean timedOut()
- 
terminatedEarly
- 
hits
- 
aggregations
- 
suggest
- 
getNumReducePhasespublic final int getNumReducePhases()Returns the number of reduce phases applied to obtain this search response
- 
profileReturns the profile results for this search response (including all shards). An empty map is returned if profiling was not enabled- Returns:
- Profile results
 
- 
toXContentpublic final org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
- toXContentin interface- org.elasticsearch.common.xcontent.ToXContent
- Throws:
- IOException
 
- 
writeTo- Throws:
- IOException
 
 
-