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

com.sksamuel.elastic4s.requests.searches.queries.matches.MatchPhraseQuery.scala Maven / Gradle / Ivy

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

import com.sksamuel.elastic4s.requests.analyzers.Analyzer
import com.sksamuel.elastic4s.requests.searches.queries.Query

case class MatchPhraseQuery(field: String,
                            value: Any,
                            boost: Option[Double] = None,
                            analyzer: Option[String] = None,
                            slop: Option[Int] = None,
                            queryName: Option[String] = None)
  extends Query {

  def analyzer(a: Analyzer): MatchPhraseQuery = copy(analyzer = Some(a.name))
  def boost(boost: Double): MatchPhraseQuery = copy(boost = Some(boost))
  def slop(slop: Int): MatchPhraseQuery = copy(slop = Some(slop))
  def queryName(queryName: String): MatchPhraseQuery = copy(queryName = Some(queryName))
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy