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

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

package com.sksamuel.elastic4s.searches.queries.matches

import org.elasticsearch.index.query.{MatchAllQueryBuilder, MatchNoneQueryBuilder, QueryBuilders}

object MatchAllQueryBuilder {
  def apply(q: MatchAllQueryDefinition): MatchAllQueryBuilder = {
    val builder = QueryBuilders.matchAllQuery
    q.boost.map(_.toFloat).foreach(builder.boost)
    q.queryName.foreach(builder.queryName)
    builder
  }
}

object MatchNoneQueryBuilder {
  def apply(q: MatchNoneQueryDefinition): MatchNoneQueryBuilder = {
    val builder = new MatchNoneQueryBuilder()
    q.queryName.foreach(builder.queryName)
    builder
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy