Class AsyncSearch.Builder<TDocument>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AsyncSearch.Builder<TDocument>>
co.elastic.clients.elasticsearch.async_search.AsyncSearch.Builder<TDocument>
- All Implemented Interfaces:
WithJson<AsyncSearch.Builder<TDocument>>,ObjectBuilder<AsyncSearch<TDocument>>
- Enclosing class:
- AsyncSearch<TDocument>
public static class AsyncSearch.Builder<TDocument>
extends WithJsonObjectBuilderBase<AsyncSearch.Builder<TDocument>>
implements ObjectBuilder<AsyncSearch<TDocument>>
Builder for
AsyncSearch.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AsyncSearch.Builder<TDocument>aggregations(String key, Aggregate value) Partial aggregations results, coming from the shards that have already completed running the query.final AsyncSearch.Builder<TDocument>Partial aggregations results, coming from the shards that have already completed running the query.final AsyncSearch.Builder<TDocument>aggregations(Map<String, Aggregate> map) Partial aggregations results, coming from the shards that have already completed running the query.build()Builds aAsyncSearch.final AsyncSearch.Builder<TDocument>clusters(ClusterStatistics value) API name:_clustersfinal AsyncSearch.Builder<TDocument>API name:_clustersfinal AsyncSearch.Builder<TDocument>API name:fieldsfinal AsyncSearch.Builder<TDocument>API name:fieldsfinal AsyncSearch.Builder<TDocument>hits(HitsMetadata<TDocument> value) Required - API name:hitsfinal AsyncSearch.Builder<TDocument>Required - API name:hitsfinal AsyncSearch.Builder<TDocument>API name:max_scorefinal AsyncSearch.Builder<TDocument>numReducePhases(Long value) Indicates how many reductions of the results have been performed.final AsyncSearch.Builder<TDocument>API name:pit_idfinal AsyncSearch.Builder<TDocument>API name:profilefinal AsyncSearch.Builder<TDocument>API name:profilefinal AsyncSearch.Builder<TDocument>API name:_scroll_idprotected AsyncSearch.Builder<TDocument>self()final AsyncSearch.Builder<TDocument>shards(ShardStatistics value) Required - Indicates how many shards have run the query.final AsyncSearch.Builder<TDocument>Required - Indicates how many shards have run the query.final AsyncSearch.Builder<TDocument>suggest(String key, List<Suggestion<TDocument>> value) API name:suggestfinal AsyncSearch.Builder<TDocument>API name:suggestfinal AsyncSearch.Builder<TDocument>Serializer for TDocument.final AsyncSearch.Builder<TDocument>terminatedEarly(Boolean value) API name:terminated_earlyfinal AsyncSearch.Builder<TDocument>timedOut(boolean value) Required - API name:timed_outfinal AsyncSearch.Builder<TDocument>took(long value) Required - API name:tookMethods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregations
Partial aggregations results, coming from the shards that have already completed running the query.API name:
aggregationsAdds all entries of
maptoaggregations. -
aggregations
Partial aggregations results, coming from the shards that have already completed running the query.API name:
aggregationsAdds an entry to
aggregations. -
aggregations
public final AsyncSearch.Builder<TDocument> aggregations(String key, Function<Aggregate.Builder, ObjectBuilder<Aggregate>> fn) Partial aggregations results, coming from the shards that have already completed running the query.API name:
aggregationsAdds an entry to
aggregationsusing a builder lambda. -
clusters
API name:_clusters -
clusters
public final AsyncSearch.Builder<TDocument> 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. -
hits
Required - API name:hits -
hits
public final AsyncSearch.Builder<TDocument> hits(Function<HitsMetadata.Builder<TDocument>, ObjectBuilder<HitsMetadata<TDocument>>> fn) Required - API name:hits -
maxScore
API name:max_score -
numReducePhases
Indicates how many reductions of the results have been performed. If this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.API name:
num_reduce_phases -
profile
API name:profile -
profile
public final AsyncSearch.Builder<TDocument> profile(Function<Profile.Builder, ObjectBuilder<Profile>> fn) API name:profile -
pitId
API name:pit_id -
scrollId
API name:_scroll_id -
shards
Required - Indicates how many shards have run the query. Note that in order for shard results to be included in the search response, they need to be reduced first.API name:
_shards -
shards
public final AsyncSearch.Builder<TDocument> shards(Function<ShardStatistics.Builder, ObjectBuilder<ShardStatistics>> fn) Required - Indicates how many shards have run the query. Note that in order for shard results to be included in the search response, they need to be reduced first.API name:
_shards -
suggest
API name:suggestAdds all entries of
maptosuggest. -
suggest
API name:suggestAdds an entry to
suggest. -
terminatedEarly
API name:terminated_early -
timedOut
Required - API name:timed_out -
took
Required - API name:took -
tDocumentSerializer
public final AsyncSearch.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value) Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<AsyncSearch.Builder<TDocument>>
-
build
Builds aAsyncSearch.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
NullPointerException- if some of the required fields are null.
-