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

com.sksamuel.elastic4s.requests.searches.span.SpanNearQuery.scala Maven / Gradle / Ivy

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

case class SpanNearQuery(clauses: Seq[SpanQuery],
                         slop: Int,
                         boost: Option[Double] = None,
                         inOrder: Option[Boolean] = None,
                         queryName: Option[String] = None)
  extends SpanQuery {

  def clause(first: SpanQuery, rest: SpanQuery*): SpanNearQuery = clauses(first +: rest)
  def clauses(clauses: Iterable[SpanQuery]): SpanNearQuery = copy(clauses = this.clauses ++ clauses)

  def boost(boost: Double): SpanNearQuery = copy(boost = Option(boost))
  def queryName(name: String): SpanNearQuery = copy(queryName = Option(name))
  def inOrder(inOrder: Boolean): SpanNearQuery = copy(inOrder = Option(inOrder))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy