Class SearchShardsRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<SearchShardsRequest.Builder>
co.elastic.clients.elasticsearch.core.SearchShardsRequest.Builder
- All Implemented Interfaces:
WithJson<SearchShardsRequest.Builder>,ObjectBuilder<SearchShardsRequest>
- Enclosing class:
- SearchShardsRequest
public static class SearchShardsRequest.Builder
extends RequestBase.AbstractBuilder<SearchShardsRequest.Builder>
implements ObjectBuilder<SearchShardsRequest>
Builder for
SearchShardsRequest.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallowNoIndices(Boolean value) A setting that does two separate checks on the index expression.build()Builds aSearchShardsRequest.expandWildcards(ExpandWildcard value, ExpandWildcard... values) Type of index that wildcard patterns can match.expandWildcards(List<ExpandWildcard> list) Type of index that wildcard patterns can match.ignoreUnavailable(Boolean value) Iffalse, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable.A comma-separated list of data streams, indices, and aliases to search.A comma-separated list of data streams, indices, and aliases to search.Iftrue, the request retrieves information from the local node only.masterTimeout(Time value) The period to wait for a connection to the master node.The period to wait for a connection to the master node.preference(String value) The node or shard the operation should be performed on.routeSlice(String value) The slice identifier for routing the search to a specific slice.A custom value used to route operations to a specific shard.A custom value used to route operations to a specific shard.protected SearchShardsRequest.Builderself()Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
allowNoIndices
A setting that does two separate checks on the index expression. Iffalse, the request returns an error (1) if any wildcard expression (including_alland*) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. Iftrue, index expressions that resolve to no indices are allowed and the request returns an empty result.API name:
allow_no_indices -
expandWildcards
Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds all elements of
listtoexpandWildcards. -
expandWildcards
public final SearchShardsRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values) Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such asopen,hidden.API name:
expand_wildcardsAdds one or more values to
expandWildcards. -
index
A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (*). To search all data streams and indices, omit this parameter or use*or_all.API name:
indexAdds all elements of
listtoindex. -
index
A comma-separated list of data streams, indices, and aliases to search. It supports wildcards (*). To search all data streams and indices, omit this parameter or use*or_all.API name:
indexAdds one or more values to
index. -
local
Iftrue, the request retrieves information from the local node only.API name:
local -
masterTimeout
The period to wait for a connection to the master node. If the master node is not available before the timeout expires, the request fails and returns an error. IT can also be set to-1to indicate that the request should never timeout.API name:
master_timeout -
masterTimeout
public final SearchShardsRequest.Builder masterTimeout(Function<Time.Builder, ObjectBuilder<Time>> fn) The period to wait for a connection to the master node. If the master node is not available before the timeout expires, the request fails and returns an error. IT can also be set to-1to indicate that the request should never timeout.API name:
master_timeout -
preference
The node or shard the operation should be performed on. It is random by default.API name:
preference -
routeSlice
The slice identifier for routing the search to a specific slice. When provided, the request is limited to shards that match the given slice value. Use the special value_allto query all slices without restricting to a routing value. Required whenindex.slice.enabledistruefor the target index; not allowed whenindex.slice.enabledisfalse.API name:
_slice -
routing
A custom value used to route operations to a specific shard. Not allowed whenindex.slice.enabledistruefor the target index; use_sliceinstead.API name:
routingAdds all elements of
listtorouting. -
routing
A custom value used to route operations to a specific shard. Not allowed whenindex.slice.enabledistruefor the target index; use_sliceinstead.API name:
routingAdds one or more values to
routing. -
self
- Specified by:
selfin classRequestBase.AbstractBuilder<SearchShardsRequest.Builder>
-
build
Builds aSearchShardsRequest.- Specified by:
buildin interfaceObjectBuilder<SearchShardsRequest>- Throws:
NullPointerException- if some of the required fields are null.
-