Class ForcemergeRequest.Builder

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

public static class ForcemergeRequest.Builder extends RequestBase.AbstractBuilder<ForcemergeRequest.Builder> implements ObjectBuilder<ForcemergeRequest>
Builder for ForcemergeRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • allowNoIndices

      public final ForcemergeRequest.Builder allowNoIndices(@Nullable Boolean value)
      A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) 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. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

      API name: allow_no_indices

    • expandWildcards

      public final ForcemergeRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      public final ForcemergeRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Whether to expand wildcard expression to concrete indices that are open, closed or both.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • flush

      public final ForcemergeRequest.Builder flush(@Nullable Boolean value)
      Specify whether the index should be flushed after performing the operation

      API name: flush

    • ignoreUnavailable

      public final ForcemergeRequest.Builder ignoreUnavailable(@Nullable Boolean value)
      If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

      API name: ignore_unavailable

    • index

      public final ForcemergeRequest.Builder index(List<String> list)
      A comma-separated list of index names; use _all or empty string to perform the operation on all indices

      API name: index

      Adds all elements of list to index.

    • index

      public final ForcemergeRequest.Builder index(String value, String... values)
      A comma-separated list of index names; use _all or empty string to perform the operation on all indices

      API name: index

      Adds one or more values to index.

    • maxNumSegments

      public final ForcemergeRequest.Builder maxNumSegments(@Nullable Long value)
      The number of segments the index should be merged into (default: dynamic)

      API name: max_num_segments

    • onlyExpungeDeletes

      public final ForcemergeRequest.Builder onlyExpungeDeletes(@Nullable Boolean value)
      Specify whether the operation should only expunge deleted documents

      API name: only_expunge_deletes

    • waitForCompletion

      public final ForcemergeRequest.Builder waitForCompletion(@Nullable Boolean value)
      Should the request wait until the force merge is completed

      API name: wait_for_completion

    • self

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

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