All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sksamuel.elastic4s.requests.indexes.admin.ForceMergeRequest.scala Maven / Gradle / Ivy

There is a newer version: 8.15.1
Show newest version
package com.sksamuel.elastic4s.requests.indexes.admin

import com.sksamuel.elastic4s.ext.OptionImplicits._

case class ForceMergeRequest(indexes: Seq[String],
                             flush: Option[Boolean] = None,
                             maxSegments: Option[Int] = None,
                             waitForCompletion: Option[Boolean] = None,
                             onlyExpungeDeletes: Option[Boolean] = None) {

  def flush(flush: Boolean): ForceMergeRequest = copy(flush = flush.some)
  def maxSegments(maxSegments: Int): ForceMergeRequest = copy(maxSegments = maxSegments.some)

  /**
    * Should the optimization only expunge deletes from the index, without full optimization.
    * Defaults to full optimization (false).
    */
  def onlyExpungeDeletes(expunge: Boolean): ForceMergeRequest = copy(onlyExpungeDeletes = expunge.some)

  def waitForCompletion(waitForCompletion: Boolean): ForceMergeRequest = copy(waitForCompletion = waitForCompletion.some)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy