Class SearchTemplateRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<SearchTemplateRequest.Builder>
co.elastic.clients.elasticsearch.core.SearchTemplateRequest.Builder
- All Implemented Interfaces:
WithJson<SearchTemplateRequest.Builder>,ObjectBuilder<SearchTemplateRequest>
- Enclosing class:
- SearchTemplateRequest
public static class SearchTemplateRequest.Builder extends WithJsonObjectBuilderBase<SearchTemplateRequest.Builder> implements ObjectBuilder<SearchTemplateRequest>
Builder for
SearchTemplateRequest.-
Constructor Summary
Constructors Constructor Description Builder() -
Method Summary
Modifier and Type Method Description SearchTemplateRequest.BuilderallowNoIndices(java.lang.Boolean value)Whether to ignore if a wildcard indices expression resolves into no concrete indices.SearchTemplateRequestbuild()Builds aSearchTemplateRequest.SearchTemplateRequest.BuilderccsMinimizeRoundtrips(java.lang.Boolean value)Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionSearchTemplateRequest.BuilderexpandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.SearchTemplateRequest.BuilderexpandWildcards(java.util.List<ExpandWildcard> list)Whether to expand wildcard expression to concrete indices that are open, closed or both.SearchTemplateRequest.Builderexplain(java.lang.Boolean value)API name:explainSearchTemplateRequest.Builderid(java.lang.String value)ID of the search template to use.SearchTemplateRequest.BuilderignoreThrottled(java.lang.Boolean value)Whether specified concrete, expanded or aliased indices should be ignored when throttledSearchTemplateRequest.BuilderignoreUnavailable(java.lang.Boolean value)Whether specified concrete indices should be ignored when unavailable (missing or closed)SearchTemplateRequest.Builderindex(java.lang.String value, java.lang.String... values)Comma-separated list of data streams, indices, and aliases to search.SearchTemplateRequest.Builderindex(java.util.List<java.lang.String> list)Comma-separated list of data streams, indices, and aliases to search.SearchTemplateRequest.Builderparams(java.lang.String key, JsonData value)API name:paramsSearchTemplateRequest.Builderparams(java.util.Map<java.lang.String,JsonData> map)API name:paramsSearchTemplateRequest.Builderpreference(java.lang.String value)Specify the node or shard the operation should be performed on (default: random)SearchTemplateRequest.Builderprofile(java.lang.Boolean value)API name:profileSearchTemplateRequest.Builderrouting(java.lang.String value)Custom value used to route operations to a specific shard.SearchTemplateRequest.Builderscroll(Time value)Specifies how long a consistent view of the index should be maintained for scrolled search.SearchTemplateRequest.Builderscroll(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specifies how long a consistent view of the index should be maintained for scrolled search.SearchTemplateRequest.BuildersearchType(SearchType value)The type of the search operation.protected SearchTemplateRequest.Builderself()SearchTemplateRequest.Buildersource(java.lang.String value)An inline search template.SearchTemplateRequest.Buildertype(java.lang.String value, java.lang.String... values)A comma-separated list of document types to search; leave empty to perform the operation on all typesSearchTemplateRequest.Buildertype(java.util.List<java.lang.String> list)A comma-separated list of document types to search; leave empty to perform the operation on all typesMethods 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
-
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_allstring or when no indices have been specified)API name:
allow_no_indices -
ccsMinimizeRoundtrips
public final SearchTemplateRequest.Builder ccsMinimizeRoundtrips(@Nullable java.lang.Boolean value)Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionAPI name:
ccs_minimize_roundtrips -
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
public final SearchTemplateRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
explain
API name:explain -
id
ID of the search template to use. If no source is specified, this parameter is required.API name:
id -
ignoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled -
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
indexAdds all elements of
listtoindex. -
index
public final SearchTemplateRequest.Builder index(java.lang.String value, java.lang.String... values)Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
indexAdds one or more values to
index. -
params
API name:paramsAdds all entries of
maptoparams. -
params
API name:paramsAdds an entry to
params. -
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference -
profile
API name:profile -
routing
Custom value used to route operations to a specific shard.API name:
routing -
scroll
Specifies how long a consistent view of the index should be maintained for scrolled search.API name:
scroll -
scroll
public final SearchTemplateRequest.Builder scroll(java.util.function.Function<Time.Builder,ObjectBuilder<Time>> fn)Specifies how long a consistent view of the index should be maintained for scrolled search.API name:
scroll -
searchType
The type of the search operation.API name:
search_type -
source
An inline search template. Supports the same parameters as the search API's request body. Also supports Mustache variables. If no id is specified, this parameter is required.API name:
source -
type
A comma-separated list of document types to search; leave empty to perform the operation on all typesAPI name:
typeAdds all elements of
listtotype. -
type
public final SearchTemplateRequest.Builder type(java.lang.String value, java.lang.String... values)A comma-separated list of document types to search; leave empty to perform the operation on all typesAPI name:
typeAdds one or more values to
type. -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<SearchTemplateRequest.Builder>
-
build
Builds aSearchTemplateRequest.- Specified by:
buildin interfaceObjectBuilder<SearchTemplateRequest>- Throws:
java.lang.NullPointerException- if some of the required fields are null.
-