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 class
ResponseBody.AbstractBuilder<TDocument,
BuilderT extends ResponseBody.AbstractBuilder<TDocument, BuilderT>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ResponseBody
(ResponseBody.AbstractBuilder<TDocument, ?> builder) -
Method Summary
Modifier and TypeMethodDescriptionAPI name:aggregations
final ClusterStatistics
clusters()
API name:_clusters
fields()
API name:fields
final HitsMetadata<TDocument>
hits()
Required - The returned documents and metadata.final Double
maxScore()
API name:max_score
final Long
API name:num_reduce_phases
final String
pitId()
API name:pit_id
final Profile
profile()
API name:profile
final String
scrollId()
The identifier for the search and its search context.void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static <TDocument,
BuilderT extends ResponseBody.AbstractBuilder<TDocument, BuilderT>>
voidsetupResponseBodyDeserializer
(ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer) final ShardStatistics
shards()
Required - A count of shards used for the request.final Map<String,
List<Suggestion<TDocument>>> suggest()
API name:suggest
final Boolean
API name:terminated_early
final boolean
timedOut()
Required - Iftrue
, the request timed out before completion; returned results may be partial or empty.final long
took()
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 thescroll
query 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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupResponseBodyDeserializer
protected static <TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument, void setupResponseBodyDeserializerBuilderT>> (ObjectDeserializer<BuilderT> op, JsonpDeserializer<TDocument> tDocumentDeserializer)
-