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 Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Aggregationsprotected SearchHitsprotected intprotected SearchProfileShardResultsprotected Suggestprotected Booleanprotected booleanFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS - 
Constructor Summary
ConstructorsConstructorDescriptionSearchResponseSections(SearchHits hits, Aggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileShardResults profileResults, int numReducePhases) - 
Method Summary
Modifier 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment 
- 
Field Details
- 
hits
 - 
aggregations
 - 
suggest
 - 
profileResults
 - 
timedOut
protected final boolean timedOut - 
terminatedEarly
 - 
numReducePhases
protected final int numReducePhases 
 - 
 - 
Constructor Details
- 
SearchResponseSections
public SearchResponseSections(SearchHits hits, Aggregations aggregations, Suggest suggest, boolean timedOut, Boolean terminatedEarly, SearchProfileShardResults profileResults, int numReducePhases) 
 - 
 - 
Method Details
- 
timedOut
public final boolean timedOut() - 
terminatedEarly
 - 
hits
 - 
aggregations
 - 
suggest
 - 
getNumReducePhases
public final int getNumReducePhases()Returns the number of reduce phases applied to obtain this search response - 
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
 
 - 
toXContent
public 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 interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
 IOException
 - 
writeTo
- Throws:
 IOException
 
 -