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

com.sksamuel.elastic4s.IndexRecoveryDsl.scala Maven / Gradle / Ivy

There is a newer version: 6.0.0-rc1
Show newest version
package com.sksamuel.elastic4s

import org.elasticsearch.action.admin.indices.recovery.{RecoveryRequest, RecoveryResponse}
import org.elasticsearch.client.Client

import scala.concurrent.Future

trait IndexRecoveryDsl {

  implicit object IndexRecoveryDefinitionExecutable
    extends Executable[IndexRecoveryDefinition, RecoveryResponse, RecoveryResponse] {
    override def apply(c: Client, t: IndexRecoveryDefinition): Future[RecoveryResponse] = {
      injectFuture(c.admin.indices.recoveries(t.build, _))
    }
  }
}

class IndexRecoveryDefinition(indices: Seq[String]) {
  private def builder = new RecoveryRequest(indices: _*)
  def build = builder
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy