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 Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description AsyncSearch.Builder<TDocument>
aggregations(java.lang.String key, Aggregate value)
API name:aggregations
AsyncSearch.Builder<TDocument>
aggregations(java.lang.String key, java.util.function.Function<Aggregate.Builder,ObjectBuilder<Aggregate>> fn)
API name:aggregations
AsyncSearch.Builder<TDocument>
aggregations(java.util.Map<java.lang.String,Aggregate> map)
API name:aggregations
AsyncSearch<TDocument>
build()
Builds aAsyncSearch
.AsyncSearch.Builder<TDocument>
clusters(ClusterStatistics value)
API name:_clusters
AsyncSearch.Builder<TDocument>
clusters(java.util.function.Function<ClusterStatistics.Builder,ObjectBuilder<ClusterStatistics>> fn)
API name:_clusters
AsyncSearch.Builder<TDocument>
fields(java.lang.String key, JsonData value)
API name:fields
AsyncSearch.Builder<TDocument>
fields(java.util.Map<java.lang.String,JsonData> map)
API name:fields
AsyncSearch.Builder<TDocument>
hits(HitsMetadata<TDocument> value)
Required - API name:hits
AsyncSearch.Builder<TDocument>
hits(java.util.function.Function<HitsMetadata.Builder<TDocument>,ObjectBuilder<HitsMetadata<TDocument>>> fn)
Required - API name:hits
AsyncSearch.Builder<TDocument>
maxScore(java.lang.Double value)
API name:max_score
AsyncSearch.Builder<TDocument>
numReducePhases(java.lang.Long value)
API name:num_reduce_phases
AsyncSearch.Builder<TDocument>
pitId(java.lang.String value)
API name:pit_id
AsyncSearch.Builder<TDocument>
profile(Profile value)
API name:profile
AsyncSearch.Builder<TDocument>
profile(java.util.function.Function<Profile.Builder,ObjectBuilder<Profile>> fn)
API name:profile
AsyncSearch.Builder<TDocument>
scrollId(java.lang.String value)
API name:_scroll_id
protected AsyncSearch.Builder<TDocument>
self()
AsyncSearch.Builder<TDocument>
shards(ShardStatistics value)
Required - API name:_shards
AsyncSearch.Builder<TDocument>
shards(java.util.function.Function<ShardStatistics.Builder,ObjectBuilder<ShardStatistics>> fn)
Required - API name:_shards
AsyncSearch.Builder<TDocument>
suggest(java.lang.String key, java.util.List<Suggestion<TDocument>> value)
API name:suggest
AsyncSearch.Builder<TDocument>
suggest(java.util.Map<java.lang.String,java.util.List<Suggestion<TDocument>>> map)
API name:suggest
AsyncSearch.Builder<TDocument>
tDocumentSerializer(JsonpSerializer<TDocument> value)
Serializer for TDocument.AsyncSearch.Builder<TDocument>
terminatedEarly(java.lang.Boolean value)
API name:terminated_early
AsyncSearch.Builder<TDocument>
timedOut(boolean value)
Required - API name:timed_out
AsyncSearch.Builder<TDocument>
took(long value)
Required - API name:took
Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregations
public final AsyncSearch.Builder<TDocument> aggregations(java.util.Map<java.lang.String,Aggregate> map)API name:aggregations
Adds all entries of
map
toaggregations
. -
aggregations
API name:aggregations
Adds an entry to
aggregations
. -
aggregations
public final AsyncSearch.Builder<TDocument> aggregations(java.lang.String key, java.util.function.Function<Aggregate.Builder,ObjectBuilder<Aggregate>> fn)API name:aggregations
Adds an entry to
aggregations
using a builder lambda. -
clusters
API name:_clusters
-
clusters
public final AsyncSearch.Builder<TDocument> clusters(java.util.function.Function<ClusterStatistics.Builder,ObjectBuilder<ClusterStatistics>> fn)API name:_clusters
-
fields
API name:fields
Adds all entries of
map
tofields
. -
fields
API name:fields
Adds an entry to
fields
. -
hits
Required - API name:hits
-
hits
public final AsyncSearch.Builder<TDocument> hits(java.util.function.Function<HitsMetadata.Builder<TDocument>,ObjectBuilder<HitsMetadata<TDocument>>> fn)Required - API name:hits
-
maxScore
API name:max_score
-
numReducePhases
API name:num_reduce_phases
-
profile
API name:profile
-
profile
public final AsyncSearch.Builder<TDocument> profile(java.util.function.Function<Profile.Builder,ObjectBuilder<Profile>> fn)API name:profile
-
pitId
API name:pit_id
-
scrollId
API name:_scroll_id
-
shards
Required - API name:_shards
-
shards
public final AsyncSearch.Builder<TDocument> shards(java.util.function.Function<ShardStatistics.Builder,ObjectBuilder<ShardStatistics>> fn)Required - API name:_shards
-
suggest
public final AsyncSearch.Builder<TDocument> suggest(java.util.Map<java.lang.String,java.util.List<Suggestion<TDocument>>> map)API name:suggest
Adds all entries of
map
tosuggest
. -
suggest
public final AsyncSearch.Builder<TDocument> suggest(java.lang.String key, java.util.List<Suggestion<TDocument>> value)API name:suggest
Adds 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:
self
in classWithJsonObjectBuilderBase<AsyncSearch.Builder<TDocument>>
-
build
Builds aAsyncSearch
.- Specified by:
build
in interfaceObjectBuilder<TDocument>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-