Class 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 Details

    • Builder

      public Builder()
  • Method Details

    • filter

      public final PutAliasRequest.Builder filter(@Nullable Query value)
      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

      public final PutAliasRequest.Builder index(List<String> list)
      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 to index.

    • index

      public final PutAliasRequest.Builder index(String value, String... values)
      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

      public final PutAliasRequest.Builder indexRouting(@Nullable String value)
      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

      public final PutAliasRequest.Builder isWriteIndex(@Nullable Boolean value)
      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

      public final PutAliasRequest.Builder masterTimeout(@Nullable Time value)
      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

      public final PutAliasRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      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 PutAliasRequest.Builder name(String value)
      Required - Alias to update. If the alias doesn’t exist, the request creates it. Index alias names support date math.

      API name: name

    • routing

      public final PutAliasRequest.Builder routing(@Nullable String value)
      Value used to route indexing and search operations to a specific shard. Data stream aliases don’t support this parameter.

      API name: routing

    • searchRouting

      public final PutAliasRequest.Builder searchRouting(@Nullable String value)
      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

      public final PutAliasRequest.Builder timeout(@Nullable Time value)
      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

      protected PutAliasRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<PutAliasRequest.Builder>
    • build

      public PutAliasRequest build()
      Builds a PutAliasRequest.
      Specified by:
      build in interface ObjectBuilder<PutAliasRequest>
      Throws:
      NullPointerException - if some of the required fields are null.