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

com.sksamuel.elastic4s.handlers.index.mapping.IndexMappersToFields.scala Maven / Gradle / Ivy

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

import com.sksamuel.elastic4s.fields.ElasticField
import com.sksamuel.elastic4s.handlers.fields.ElasticFieldBuilderFn
import com.sksamuel.elastic4s.requests.indexes.IndexMappings

object IndexMappersToFields {

  def mappingToFields(indexMapping: IndexMappings): Seq[ElasticField] =
    indexMapping.mappings.map {
      case (name, value: Map[String, Any]) => ElasticFieldBuilderFn.construct(name, value)
    }.toSeq
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy