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

com.sksamuel.elastic4s.handlers.fields.PercolatorFieldBuilderFn.scala Maven / Gradle / Ivy

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

import com.sksamuel.elastic4s.fields.PercolatorField
import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory}

object PercolatorFieldBuilderFn {
  def toField(name: String, values: Map[String, Any]): PercolatorField = PercolatorField(name)

  def build(field: PercolatorField): XContentBuilder = {

    val builder = XContentFactory.jsonBuilder()
    builder.field("type", field.`type`)
    builder.endObject()
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy