Class ResponseBody<TDocument>
java.lang.Object
co.elastic.clients.elasticsearch.core.search.ResponseBody<TDocument>
- All Implemented Interfaces:
JsonpSerializable
- Direct Known Subclasses:
MultiSearchItem,ScrollResponse,SearchApplicationSearchResponse,SearchResponse
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResponseBody.AbstractBuilder<TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument, BuilderT>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedResponseBody(ResponseBody.AbstractBuilder<TDocument, ?> builder) -
Method Summary
Modifier and TypeMethodDescriptionAPI name:aggregationsfinal ClusterStatisticsclusters()API name:_clustersfields()API name:fieldsfinal HitsMetadata<TDocument>hits()Required - The returned documents and metadata.final DoublemaxScore()API name:max_scorefinal LongAPI name:num_reduce_phasesfinal StringpitId()API name:pit_idfinal Profileprofile()API name:profilefinal StringscrollId()The identifier for the search and its search context.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument, BuilderT>>
voidsetupResponseBodyDeserializer(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer) final ShardStatisticsshards()Required - A count of shards used for the request.final Map<String,List<Suggestion<TDocument>>> suggest()API name:suggestfinal BooleanAPI name:terminated_earlyfinal booleantimedOut()Required - Iftrue, the request timed out before completion; returned results may be partial or empty.final longtook()Required - The number of milliseconds it took Elasticsearch to run the request.toString()
-
Constructor Details
-
ResponseBody
-
-
Method Details
-
took
public final long took()Required - The number of milliseconds it took Elasticsearch to run the request. This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response. It includes:- Communication time between the coordinating node and data nodes
- Time the request spends in the search thread pool, queued for execution
- Actual run time
It does not include:
- Time needed to send the request to Elasticsearch
- Time needed to serialize the JSON response
- Time needed to send the response to a client
API name:
took -
timedOut
public final boolean timedOut()Required - Iftrue, the request timed out before completion; returned results may be partial or empty.API name:
timed_out -
shards
Required - A count of shards used for the request.API name:
_shards -
hits
Required - The returned documents and metadata.API name:
hits -
aggregations
API name:aggregations -
clusters
API name:_clusters -
fields
API name:fields -
maxScore
API name:max_score -
numReducePhases
API name:num_reduce_phases -
profile
API name:profile -
pitId
API name:pit_id -
scrollId
The identifier for the search and its search context. You can use this scroll ID with the scroll API to retrieve the next batch of search results for the request. This property is returned only if thescrollquery parameter is specified in the request.API name:
_scroll_id -
suggest
API name:suggest -
terminatedEarly
API name:terminated_early -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupResponseBodyDeserializer
protected static <TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument, void setupResponseBodyDeserializerBuilderT>> (ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer)
-