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

com.sksamuel.elastic4s.fields.IntegerField.scala Maven / Gradle / Ivy

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

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

object IntegerField {
  val `type`: String = "integer"
}
case class IntegerField(name: String,
                        boost: Option[Double] = None,
                        coerce: Option[Boolean] = None,
                        copyTo: Seq[String] = Nil,
                        docValues: Option[Boolean] = None,
                        ignoreMalformed: Option[Boolean] = None,
                        index: Option[Boolean] = None,
                        nullValue: Option[Int] = None,
                        store: Option[Boolean] = None,
                        meta: Map[String, Any] = Map.empty) extends NumberField[Int] {
  override def `type`: String = IntegerField.`type`

  def coerce(coerce: Boolean): IntegerField = copy(coerce = coerce.some)

  def stored(store: Boolean): IntegerField = copy(store = store.some)

  def nullValue(nullValue: Int): IntegerField = copy(nullValue = nullValue.some)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy