Class PutAliasRequest.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<PutAliasRequest.Builder>
co.elastic.clients.elasticsearch.indices.PutAliasRequest.Builder
- All Implemented Interfaces:
WithJson<PutAliasRequest.Builder>
,ObjectBuilder<PutAliasRequest>
- Enclosing class:
- PutAliasRequest
public static class PutAliasRequest.Builder
extends RequestBase.AbstractBuilder<PutAliasRequest.Builder>
implements ObjectBuilder<PutAliasRequest>
Builder for
PutAliasRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds aPutAliasRequest
.final PutAliasRequest.Builder
Query used to limit documents the alias can access.final PutAliasRequest.Builder
Query used to limit documents the alias can access.final PutAliasRequest.Builder
Required - Comma-separated list of data streams or indices to add.final PutAliasRequest.Builder
Required - Comma-separated list of data streams or indices to add.final PutAliasRequest.Builder
indexRouting
(String value) Value used to route indexing operations to a specific shard.final PutAliasRequest.Builder
isWriteIndex
(Boolean value) Iftrue
, sets the write index or data stream for the alias.final PutAliasRequest.Builder
masterTimeout
(Time value) Period to wait for a connection to the master node.final PutAliasRequest.Builder
Period to wait for a connection to the master node.final PutAliasRequest.Builder
Required - Alias to update.final PutAliasRequest.Builder
Value used to route indexing and search operations to a specific shard.final PutAliasRequest.Builder
searchRouting
(String value) Value used to route search operations to a specific shard.protected PutAliasRequest.Builder
self()
final PutAliasRequest.Builder
Period to wait for a response.final PutAliasRequest.Builder
Period to wait for a response.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJson
Methods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
filter
Query used to limit documents the alias can access.API name:
filter
-
filter
Query used to limit documents the alias can access.API name:
filter
-
index
Required - Comma-separated list of data streams or indices to add. Supports wildcards (*
). Wildcard patterns that match both data streams and indices return an error.API name:
index
Adds all elements of
list
toindex
. -
index
Required - Comma-separated list of data streams or indices to add. Supports wildcards (*
). Wildcard patterns that match both data streams and indices return an error.API name:
index
Adds one or more values to
index
. -
indexRouting
Value used to route indexing operations to a specific shard. If specified, this overwrites therouting
value for indexing operations. Data stream aliases don’t support this parameter.API name:
index_routing
-
isWriteIndex
Iftrue
, sets the write index or data stream for the alias. If an alias points to multiple indices or data streams andis_write_index
isn’t set, the alias rejects write requests. If an index alias points to one index andis_write_index
isn’t set, the index automatically acts as the write index. Data stream aliases don’t automatically set a write data stream, even if the alias points to one data stream.API name:
is_write_index
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
masterTimeout
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.API name:
master_timeout
-
name
Required - Alias to update. If the alias doesn’t exist, the request creates it. Index alias names support date math.API name:
name
-
routing
Value used to route indexing and search operations to a specific shard. Data stream aliases don’t support this parameter.API name:
routing
-
searchRouting
Value used to route search operations to a specific shard. If specified, this overwrites therouting
value for search operations. Data stream aliases don’t support this parameter.API name:
search_routing
-
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout
-
timeout
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.API name:
timeout
-
self
- Specified by:
self
in classRequestBase.AbstractBuilder<PutAliasRequest.Builder>
-
build
Builds aPutAliasRequest
.- Specified by:
build
in interfaceObjectBuilder<PutAliasRequest>
- Throws:
NullPointerException
- if some of the required fields are null.
-