public class SearchResponse extends ActionResponseimplements StatusToXContent
TransportResponse.Empty ToXContent.DelegatingMapParams , ToXContent.MapParams , ToXContent.Params headersEMPTY_PARAMS| Constructor and Description |
|---|
SearchResponse()
|
SearchResponse(InternalSearchResponse
|
| Modifier and Type | Method and Description |
|---|---|
Aggregations |
getAggregations()
|
Facets |
getFacets()
The search facets.
|
int |
getFailedShards()
The failed number of shards the search was executed on.
|
SearchHits |
getHits()
The search hits.
|
String |
getScrollId()
If scrolling was enabled (
SearchRequest, the scroll id that can be used to continue scrolling.
|
ShardSearchFailure |
getShardFailures()
The failures that occurred during the search.
|
int |
getSuccessfulShards()
The successful number of shards the search was executed on.
|
Suggest |
getSuggest()
|
TimeValue |
getTook()
How long the search took.
|
long |
getTookInMillis()
How long the search took in milliseconds.
|
int |
getTotalShards()
The total number of shards the search was executed on.
|
Boolean |
isTerminatedEarly()
Has the search operation terminated early due to reaching
terminateAfter
|
boolean |
isTimedOut()
Has the search operation timed out.
|
void |
readFrom(StreamInput
|
void |
scrollId(String
|
RestStatus |
status()
Returns the REST status to make sure it is returned correctly
|
String |
toString()
|
XContentBuilder |
toXContent(XContentBuilder
|
void |
writeTo(StreamOutput
|
putHeader, remoteAddress, remoteAddresscontextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putInContextpublic SearchResponse()
public SearchResponse(InternalSearchResponseinternalResponse, String scrollId, int totalShards, int successfulShards, long tookInMillis, ShardSearchFailure [] shardFailures)
public RestStatusstatus()
StatusToXContent
public SearchHitsgetHits()
public FacetsgetFacets()
public AggregationsgetAggregations()
public SuggestgetSuggest()
public boolean isTimedOut()
public BooleanisTerminatedEarly()
terminateAfter
public TimeValuegetTook()
public long getTookInMillis()
public int getTotalShards()
public int getSuccessfulShards()
public int getFailedShards()
public ShardSearchFailure[] getShardFailures()
public StringgetScrollId()
SearchRequest.scroll(org.elasticsearch.search.Scroll) , the scroll id that can be used to continue scrolling.
public void scrollId(StringscrollId)
public XContentBuildertoXContent(XContentBuilder builder, ToXContent .Params params) throws IOException
toXContent in interface
ToXContent
IOException
public void readFrom(StreamInputin) throws IOException
readFrom in interface
Streamable
readFrom in class
ActionResponse
IOException
public void writeTo(StreamOutputout) throws IOException
writeTo in interface
Streamable
writeTo in class
ActionResponse
IOException
public StringtoString()