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:aggregationsAsyncSearch.Builder<TDocument>aggregations(java.lang.String key, java.util.function.Function<Aggregate.Builder,ObjectBuilder<Aggregate>> fn)API name:aggregationsAsyncSearch.Builder<TDocument>aggregations(java.util.Map<java.lang.String,Aggregate> map)API name:aggregationsAsyncSearch<TDocument>build()Builds aAsyncSearch.AsyncSearch.Builder<TDocument>clusters(ClusterStatistics value)API name:_clustersAsyncSearch.Builder<TDocument>clusters(java.util.function.Function<ClusterStatistics.Builder,ObjectBuilder<ClusterStatistics>> fn)API name:_clustersAsyncSearch.Builder<TDocument>fields(java.lang.String key, JsonData value)API name:fieldsAsyncSearch.Builder<TDocument>fields(java.util.Map<java.lang.String,JsonData> map)API name:fieldsAsyncSearch.Builder<TDocument>hits(HitsMetadata<TDocument> value)Required - API name:hitsAsyncSearch.Builder<TDocument>hits(java.util.function.Function<HitsMetadata.Builder<TDocument>,ObjectBuilder<HitsMetadata<TDocument>>> fn)Required - API name:hitsAsyncSearch.Builder<TDocument>maxScore(java.lang.Double value)API name:max_scoreAsyncSearch.Builder<TDocument>numReducePhases(java.lang.Long value)API name:num_reduce_phasesAsyncSearch.Builder<TDocument>pitId(java.lang.String value)API name:pit_idAsyncSearch.Builder<TDocument>profile(Profile value)API name:profileAsyncSearch.Builder<TDocument>profile(java.util.function.Function<Profile.Builder,ObjectBuilder<Profile>> fn)API name:profileAsyncSearch.Builder<TDocument>scrollId(java.lang.String value)API name:_scroll_idprotected AsyncSearch.Builder<TDocument>self()AsyncSearch.Builder<TDocument>shards(ShardStatistics value)Required - API name:_shardsAsyncSearch.Builder<TDocument>shards(java.util.function.Function<ShardStatistics.Builder,ObjectBuilder<ShardStatistics>> fn)Required - API name:_shardsAsyncSearch.Builder<TDocument>suggest(java.lang.String key, java.util.List<Suggestion<TDocument>> value)API name:suggestAsyncSearch.Builder<TDocument>suggest(java.util.Map<java.lang.String,java.util.List<Suggestion<TDocument>>> map)API name:suggestAsyncSearch.Builder<TDocument>tDocumentSerializer(JsonpSerializer<TDocument> value)Serializer for TDocument.AsyncSearch.Builder<TDocument>terminatedEarly(java.lang.Boolean value)API name:terminated_earlyAsyncSearch.Builder<TDocument>timedOut(boolean value)Required - API name:timed_outAsyncSearch.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, _mapPutAllMethods 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:aggregationsAdds all entries of
maptoaggregations. -
aggregations
API name:aggregationsAdds 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:aggregationsAdds an entry to
aggregationsusing 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: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(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:suggestAdds all entries of
maptosuggest. -
suggest
public final AsyncSearch.Builder<TDocument> suggest(java.lang.String key, java.util.List<Suggestion<TDocument>> value)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:
java.lang.NullPointerException- if some of the required fields are null.
-