Class PutAliasRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.PutAliasRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class PutAliasRequest extends RequestBase implements JsonpSerializable
Adds a data stream or index to an alias.
See Also:
  • Field Details

  • Method Details

    • of

    • filter

      @Nullable public final Query filter()
      Query used to limit documents the alias can access.

      API name: filter

    • index

      public final List<String> 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

    • indexRouting

      @Nullable public final String indexRouting()
      Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations. Data stream aliases don’t support this parameter.

      API name: index_routing

    • isWriteIndex

      @Nullable public final Boolean isWriteIndex()
      If true, sets the write index or data stream for the alias. If an alias points to multiple indices or data streams and is_write_index isn’t set, the alias rejects write requests. If an index alias points to one index and is_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

      @Nullable public final Time 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

      public final String 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

      @Nullable public final String 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

      @Nullable public final String searchRouting()
      Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations. Data stream aliases don’t support this parameter.

      API name: search_routing

    • timeout

      @Nullable public final Time 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

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupPutAliasRequestDeserializer

      protected static void setupPutAliasRequestDeserializer(ObjectDeserializer<PutAliasRequest.Builder> op)