Class SearchTemplateRequest.Builder
java.lang.Object
co.elastic.clients.elasticsearch._core.SearchTemplateRequest.Builder
- All Implemented Interfaces:
ObjectBuilder<SearchTemplateRequest>
- Enclosing class:
- SearchTemplateRequest
public static class SearchTemplateRequest.Builder extends java.lang.Object implements ObjectBuilder<SearchTemplateRequest>
Builder for
SearchTemplateRequest
.-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description SearchTemplateRequest.Builder
addExpandWildcards(ExpandWildcardOptions value)
Add a value toexpandWildcards(List)
, creating the list if needed.SearchTemplateRequest.Builder
addIndex(java.lang.String value)
Add a value toindex(List)
, creating the list if needed.SearchTemplateRequest.Builder
addType(java.lang.String value)
Add a value totype(List)
, creating the list if needed.SearchTemplateRequest.Builder
allowNoIndices(java.lang.Boolean value)
Whether to ignore if a wildcard indices expression resolves into no concrete indices.SearchTemplateRequest
build()
Builds aSearchTemplateRequest
.SearchTemplateRequest.Builder
ccsMinimizeRoundtrips(java.lang.Boolean value)
Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionSearchTemplateRequest.Builder
expandWildcards(ExpandWildcardOptions... value)
Whether to expand wildcard expression to concrete indices that are open, closed or both.SearchTemplateRequest.Builder
expandWildcards(java.util.List<ExpandWildcardOptions> value)
Whether to expand wildcard expression to concrete indices that are open, closed or both.SearchTemplateRequest.Builder
explain(java.lang.Boolean value)
API name:explain
SearchTemplateRequest.Builder
id(java.lang.String value)
ID of the search template to use.SearchTemplateRequest.Builder
ignoreThrottled(java.lang.Boolean value)
Whether specified concrete, expanded or aliased indices should be ignored when throttledSearchTemplateRequest.Builder
ignoreUnavailable(java.lang.Boolean value)
Whether specified concrete indices should be ignored when unavailable (missing or closed)SearchTemplateRequest.Builder
index(java.lang.String... value)
Comma-separated list of data streams, indices, and aliases to search.SearchTemplateRequest.Builder
index(java.util.List<java.lang.String> value)
Comma-separated list of data streams, indices, and aliases to search.SearchTemplateRequest.Builder
params(java.util.Map<java.lang.String,JsonData> value)
API name:params
SearchTemplateRequest.Builder
preference(java.lang.String value)
Specify the node or shard the operation should be performed on (default: random)SearchTemplateRequest.Builder
profile(java.lang.Boolean value)
API name:profile
SearchTemplateRequest.Builder
putParams(java.lang.String key, JsonData value)
Add a key/value toparams(Map)
, creating the map if needed.SearchTemplateRequest.Builder
routing(java.lang.String value)
Custom value used to route operations to a specific shard.SearchTemplateRequest.Builder
scroll(java.lang.String value)
Specifies how long a consistent view of the index should be maintained for scrolled search.SearchTemplateRequest.Builder
searchType(SearchType value)
The type of the search operation.SearchTemplateRequest.Builder
source(java.lang.String value)
An inline search template.SearchTemplateRequest.Builder
type(java.lang.String... value)
A comma-separated list of document types to search; leave empty to perform the operation on all typesSearchTemplateRequest.Builder
type(java.util.List<java.lang.String> value)
A comma-separated list of document types to search; leave empty to perform the operation on all typesSearchTemplateRequest.Builder
typedKeys(java.lang.Boolean value)
Specify whether aggregation and suggester names should be prefixed by their respective types in the responseMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
index
-
index
Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*).API name:
index
-
addIndex
Add a value toindex(List)
, creating the list if needed. -
type
A comma-separated list of document types to search; leave empty to perform the operation on all typesAPI name:
type
-
type
A comma-separated list of document types to search; leave empty to perform the operation on all typesAPI name:
type
-
addType
Add a value totype(List)
, creating the list if needed. -
allowNoIndices
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes_all
string or when no indices have been specified)API name:
allow_no_indices
-
ccsMinimizeRoundtrips
Indicates whether network round-trips should be minimized as part of cross-cluster search requests executionAPI name:
ccs_minimize_roundtrips
-
expandWildcards
public SearchTemplateRequest.Builder expandWildcards(@Nullable java.util.List<ExpandWildcardOptions> value)Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
expandWildcards
Whether to expand wildcard expression to concrete indices that are open, closed or both.API name:
expand_wildcards
-
addExpandWildcards
Add a value toexpandWildcards(List)
, creating the list if needed. -
ignoreThrottled
Whether specified concrete, expanded or aliased indices should be ignored when throttledAPI name:
ignore_throttled
-
preference
Specify the node or shard the operation should be performed on (default: random)API name:
preference
-
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
-
searchType
The type of the search operation.API name:
search_type
-
typedKeys
Specify whether aggregation and suggester names should be prefixed by their respective types in the responseAPI name:
typed_keys
-
explain
API name:explain
-
id
ID of the search template to use. If no source is specified, this parameter is required.API name:
id
-
params
public SearchTemplateRequest.Builder params(@Nullable java.util.Map<java.lang.String,JsonData> value)API name:params
-
putParams
Add a key/value toparams(Map)
, creating the map if needed. -
profile
API name:profile
-
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
-
build
Builds aSearchTemplateRequest
.- Specified by:
build
in interfaceObjectBuilder<SearchTemplateRequest>
- Throws:
java.lang.NullPointerException
- if some of the required fields are null.
-