Class SearchTemplateResponse.Builder<TDocument>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<SearchTemplateResponse.Builder<TDocument>>
co.elastic.clients.elasticsearch.core.SearchTemplateResponse.Builder<TDocument>
- All Implemented Interfaces:
WithJson<SearchTemplateResponse.Builder<TDocument>>,ObjectBuilder<SearchTemplateResponse<TDocument>>
- Enclosing class:
- SearchTemplateResponse<TDocument>
public static class SearchTemplateResponse.Builder<TDocument> extends WithJsonObjectBuilderBase<SearchTemplateResponse.Builder<TDocument>> implements ObjectBuilder<SearchTemplateResponse<TDocument>>
Builder for
SearchTemplateResponse.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Methods 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
-
took
Required - API name:took -
timedOut
Required - API name:timed_out -
shards
Required - API name:_shards -
shards
public final SearchTemplateResponse.Builder<TDocument> shards(java.util.function.Function<ShardStatistics.Builder,ObjectBuilder<ShardStatistics>> fn)Required - API name:_shards -
hits
Required - API name:hits -
hits
public final SearchTemplateResponse.Builder<TDocument> hits(java.util.function.Function<HitsMetadata.Builder<TDocument>,ObjectBuilder<HitsMetadata<TDocument>>> fn)Required - API name:hits -
aggregations
public final SearchTemplateResponse.Builder<TDocument> aggregations(java.util.Map<java.lang.String,Aggregate> map)API name:aggregationsAdds all entries of
maptoaggregations. -
aggregations
public final SearchTemplateResponse.Builder<TDocument> aggregations(java.lang.String key, Aggregate value)API name:aggregationsAdds an entry to
aggregations. -
aggregations
public final SearchTemplateResponse.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 SearchTemplateResponse.Builder<TDocument> clusters(java.util.function.Function<ClusterStatistics.Builder,ObjectBuilder<ClusterStatistics>> fn)API name:_clusters -
fields
public final SearchTemplateResponse.Builder<TDocument> fields(java.util.Map<java.lang.String,JsonData> map)API name:fieldsAdds all entries of
maptofields. -
fields
public final SearchTemplateResponse.Builder<TDocument> fields(java.lang.String key, JsonData value)API name:fieldsAdds an entry to
fields. -
maxScore
API name:max_score -
numReducePhases
public final SearchTemplateResponse.Builder<TDocument> numReducePhases(@Nullable java.lang.Long value)API name:num_reduce_phases -
profile
API name:profile -
profile
public final SearchTemplateResponse.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 -
suggest
public final SearchTemplateResponse.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 SearchTemplateResponse.Builder<TDocument> suggest(java.lang.String key, java.util.List<Suggestion<TDocument>> value)API name:suggestAdds an entry to
suggest. -
terminatedEarly
public final SearchTemplateResponse.Builder<TDocument> terminatedEarly(@Nullable java.lang.Boolean value)API name:terminated_early -
tDocumentSerializer
public final SearchTemplateResponse.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<SearchTemplateResponse.Builder<TDocument>>
-
build
Builds aSearchTemplateResponse.- Specified by:
buildin interfaceObjectBuilder<TDocument>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-