Class ElasticsearchMapping
- java.lang.Object
-
- org.apache.calcite.adapter.elasticsearch.ElasticsearchMapping
-
class ElasticsearchMapping extends java.lang.Object
Stores Elasticsearch mapping information for particular index/type. This information is extracted from/$index/$type/_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, likelong
,keyword
,date
etc.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
index
private java.util.Map<java.lang.String,ElasticsearchMapping.Datatype>
mapping
private java.lang.String
type
-
Constructor Summary
Constructors Constructor Description ElasticsearchMapping(java.lang.String index, java.lang.String type, 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).(package private) java.lang.String
type()
-
-
-
Field Detail
-
index
private final java.lang.String index
-
type
private final java.lang.String type
-
mapping
private final java.util.Map<java.lang.String,ElasticsearchMapping.Datatype> mapping
-
-
Method Detail
-
mapping
java.util.Map<java.lang.String,ElasticsearchMapping.Datatype> mapping()
Returns ES schema for each field. Mapping is represented as field namefoo.bar.qux
and type (keyword
,boolean
,long
).- Returns:
- 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
null
s in flat tabular format.- See Also:
- Missing Value
-
index
java.lang.String index()
-
type
java.lang.String type()
-
-