Class ForceMergeRequestBuilder


A request to force merge one or more indices. In order to force merge all indices, pass an empty array or null for the indices. setMaxNumSegments(int) allows to control the number of segments to force merge down to. By default, will cause the force merge process to merge down to half the configured number of segments.
  • Constructor Details

  • Method Details

    • setMaxNumSegments

      public ForceMergeRequestBuilder setMaxNumSegments(int maxNumSegments)
      Will force merge the index down to <= maxNumSegments. By default, will cause the merge process to merge down to half the configured number of segments.
    • setOnlyExpungeDeletes

      public ForceMergeRequestBuilder setOnlyExpungeDeletes(boolean onlyExpungeDeletes)
      Should the merge only expunge deletes from the index, without full merging. Defaults to full merging (false).
    • setFlush

      public ForceMergeRequestBuilder setFlush(boolean flush)
      Should flush be performed after the merge. Defaults to true.