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

com.sksamuel.elastic4s.requests.common.Preference.scala Maven / Gradle / Ivy

There is a newer version: 8.15.4
Show newest version
package com.sksamuel.elastic4s.requests.common

abstract class Preference(val value: String)
object Preference {
  case class PreferNode(id: String)             extends Preference("_prefer_node:" + id)
  case class PreferNodes(ids: List[String])     extends Preference("_prefer_nodes:" + ids.mkString(","))
  case object Local                             extends Preference("_local")
  case object OnlyLocal                         extends Preference("_only_local")
  case class OnlyNode(id: String)               extends Preference("_only_node:" + id)
  case class OnlyNodes(ids: List[String])       extends Preference("_only_nodes:" + ids.mkString(","))
  case class Shards(ids: List[String])          extends Preference("_shards:" + ids.mkString(","))
  case class Custom(override val value: String) extends Preference(value)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy