Class ElasticsearchMapping

  • class ElasticsearchMapping
    extends java.lang.Object
    Stores Elasticsearch mapping information for particular index. This information is extracted from /$index/_mapping endpoint.

    Instances of this class are immutable.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  ElasticsearchMapping.Datatype
      Represents elastic data-type, like long, keyword, date etc.
    • Constructor Summary

      Constructor Description
      ElasticsearchMapping​(java.lang.String index, java.util.Map<java.lang.String,​java.lang.String> mapping)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.lang.String index()  
      (package private) java.util.Map<java.lang.String,​ElasticsearchMapping.Datatype> mapping()
      Returns ES schema for each field.
      (package private) java.util.Optional<com.fasterxml.jackson.databind.JsonNode> missingValueFor​(java.lang.String fieldName)
      Used as special aggregation key for missing values (documents that are missing a field).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ElasticsearchMapping

        ElasticsearchMapping​(java.lang.String index,
                             java.util.Map<java.lang.String,​java.lang.String> mapping)
    • Method Detail

      • mapping

        java.util.Map<java.lang.String,​ElasticsearchMapping.Datatype> mapping()
        Returns ES schema for each field. Mapping is represented as field name and type (keyword, boolean, long).
        immutable mapping between field and ES type
        See Also:
        Mapping Types
      • missingValueFor

        java.util.Optional<com.fasterxml.jackson.databind.JsonNode> missingValueFor​(java.lang.String fieldName)
        Used as special aggregation key for missing values (documents that are missing a field).

        Buckets with that value are then converted to nulls in flat tabular format.

        See Also:
        Missing Value
      • index

        java.lang.String index()