Class ResponseBody.AbstractBuilder<TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument,BuilderT>>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch.core.search.ResponseBody.AbstractBuilder<TDocument,BuilderT>
- All Implemented Interfaces:
WithJson<BuilderT>
- Direct Known Subclasses:
MultiSearchItem.Builder,ScrollResponse.Builder,SearchApplicationSearchResponse.Builder,SearchResponse.Builder
- Enclosing class:
- ResponseBody<TDocument>
public abstract static class ResponseBody.AbstractBuilder<TDocument,BuilderT extends ResponseBody.AbstractBuilder<TDocument,BuilderT>>
extends WithJsonObjectBuilderBase<BuilderT>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BuilderTaggregations(String key, Aggregate value) API name:aggregationsfinal BuilderTAPI name:aggregationsfinal BuilderTaggregations(Map<String, Aggregate> map) API name:aggregationsfinal BuilderTclusters(ClusterStatistics value) API name:_clustersfinal BuilderTAPI name:_clustersfinal BuilderTAPI name:fieldsfinal BuilderTAPI name:fieldsfinal BuilderThits(HitsMetadata<TDocument> value) Required - The returned documents and metadata.final BuilderTRequired - The returned documents and metadata.final BuilderTAPI name:max_scorefinal BuilderTnumReducePhases(Long value) API name:num_reduce_phasesfinal BuilderTAPI name:pit_idfinal BuilderTAPI name:profilefinal BuilderTAPI name:profilefinal BuilderTThe identifier for the search and its search context.protected abstract BuilderTself()final BuilderTshards(ShardStatistics value) Required - A count of shards used for the request.final BuilderTRequired - A count of shards used for the request.final BuilderTsuggest(String key, List<Suggestion<TDocument>> value) API name:suggestfinal BuilderTAPI name:suggestfinal BuilderTSerializer for TDocument.final BuilderTterminatedEarly(Boolean value) API name:terminated_earlyfinal BuilderTtimedOut(boolean value) Required - Iftrue, the request timed out before completion; returned results may be partial or empty.final BuilderTtook(long value) Required - The number of milliseconds it took Elasticsearch to run the request.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
AbstractBuilder
public AbstractBuilder()
-
-
Method Details
-
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
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 -
shards
Required - A count of shards used for the request.API name:
_shards -
hits
Required - The returned documents and metadata.API name:
hits -
hits
public final BuilderT hits(Function<HitsMetadata.Builder<TDocument>, ObjectBuilder<HitsMetadata<TDocument>>> fn) Required - The returned documents and metadata.API name:
hits -
aggregations
API name:aggregationsAdds all entries of
maptoaggregations. -
aggregations
API name:aggregationsAdds an entry to
aggregations. -
aggregations
public final BuilderT aggregations(String key, Function<Aggregate.Builder, ObjectBuilder<Aggregate>> fn) API name:aggregationsAdds an entry to
aggregationsusing a builder lambda. -
clusters
API name:_clusters -
clusters
public final BuilderT clusters(Function<ClusterStatistics.Builder, ObjectBuilder<ClusterStatistics>> fn) API name:_clusters -
fields
API name:fieldsAdds all entries of
maptofields. -
fields
API name:fieldsAdds an entry to
fields. -
maxScore
API name:max_score -
numReducePhases
API name:num_reduce_phases -
profile
API name:profile -
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:suggestAdds all entries of
maptosuggest. -
suggest
API name:suggestAdds an entry to
suggest. -
terminatedEarly
API name:terminated_early -
tDocumentSerializer
Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<BuilderT extends ResponseBody.AbstractBuilder<TDocument,BuilderT>>
-