Class Alias.Builder

All Implemented Interfaces:
WithJson<Alias.Builder>, ObjectBuilder<Alias>
Enclosing class:
Alias

public static class Alias.Builder extends WithJsonObjectBuilderBase<Alias.Builder> implements ObjectBuilder<Alias>
Builder for Alias.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • filter

      public final Alias.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

    • indexRouting

      public final Alias.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.

      API name: index_routing

    • isHidden

      public final Alias.Builder isHidden(@Nullable Boolean value)
      If true, the alias is hidden. All indices for the alias must have the same is_hidden value.

      API name: is_hidden

    • isWriteIndex

      public final Alias.Builder isWriteIndex(@Nullable Boolean value)
      If true, the index is the write index for the alias.

      API name: is_write_index

    • routing

      public final Alias.Builder routing(@Nullable String value)
      Value used to route indexing and search operations to a specific shard.

      API name: routing

    • searchRouting

      public final Alias.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.

      API name: search_routing

    • self

      protected Alias.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<Alias.Builder>
    • build

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