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

com.sksamuel.elastic4s.handlers.explain.ExplainBodyFn.scala Maven / Gradle / Ivy

package com.sksamuel.elastic4s.handlers.explain

import com.sksamuel.elastic4s.handlers.searches.queries
import com.sksamuel.elastic4s.json.{XContentBuilder, XContentFactory}
import com.sksamuel.elastic4s.requests.explain.ExplainRequest

object ExplainBodyFn {
  def apply(v: ExplainRequest): XContentBuilder = {
    val builder = XContentFactory.jsonBuilder()
    builder.rawField("query", queries.QueryBuilderFn(v.query.get))
    builder.endObject()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy