Source code for pandagg.node.mappings.field_datatypes

"""https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-types.html"""

from .abstract import ComplexField, RegularField


# CORE DATATYPES
# string
[docs]class Text(RegularField): KEY = "text"
[docs]class Keyword(RegularField): KEY = "keyword"
[docs]class ConstantKeyword(RegularField): KEY = "constant_keyword"
[docs]class WildCard(RegularField): KEY = "wildcard"
# numeric
[docs]class Long(RegularField): KEY = "long"
[docs]class Integer(RegularField): KEY = "integer"
[docs]class Short(RegularField): KEY = "short"
[docs]class Byte(RegularField): KEY = "byte"
[docs]class Double(RegularField): KEY = "double"
[docs]class Float(RegularField): KEY = "float"
[docs]class HalfFloat(RegularField): KEY = "half_float"
[docs]class ScaledFloat(RegularField): KEY = "scaled_float"
# date
[docs]class Date(RegularField): KEY = "date"
[docs]class DateNanos(RegularField): KEY = "date_nanos"
# boolean
[docs]class Boolean(RegularField): KEY = "boolean"
# binary
[docs]class Binary(RegularField): KEY = "binary"
# range
[docs]class IntegerRange(RegularField): KEY = "integer_range"
[docs]class FloatRange(RegularField): KEY = "float_range"
[docs]class LongRange(RegularField): KEY = "long_range"
[docs]class DoubleRange(RegularField): KEY = "double_range"
[docs]class DateRange(RegularField): KEY = "date_range"
[docs]class IpRange(RegularField): KEY = "ip_range"
# COMPLEX DATATYPES
[docs]class Object(ComplexField): KEY = "object"
[docs]class Nested(ComplexField): KEY = "nested"
# GEO DATATYPES
[docs]class GeoPoint(RegularField): """For lat/lon points""" KEY = "geo_point"
[docs]class GeoShape(RegularField): """For complex shapes like polygons""" KEY = "geo_shape"
# SPECIALIZED DATATYPES
[docs]class IP(RegularField): """for IPv4 and IPv6 addresses""" KEY = "ip"
[docs]class Completion(RegularField): """To provide auto-complete suggestions""" KEY = "completion"
[docs]class TokenCount(RegularField): """To count the number of tokens in a string""" KEY = "token_count"
[docs]class MapperMurMur3(RegularField): """To compute hashes of values at index-time and store them in the index""" KEY = "murmur3"
[docs]class MapperAnnotatedText(RegularField): """To index text containing special markup (typically used for identifying named entities)""" KEY = "annotated-text"
[docs]class Percolator(RegularField): """Accepts queries from the query-dsl""" KEY = "percolator"
[docs]class Join(RegularField): """Defines parent/child relation for documents within the same index""" KEY = "join"
[docs]class RankFeature(RegularField): """Record numeric feature to boost hits at query time.""" KEY = "rank_feature"
[docs]class RankFeatures(RegularField): """Record numeric features to boost hits at query time.""" KEY = "rank_features"
[docs]class DenseVector(RegularField): """Record dense vectors of float values.""" KEY = "dense_vector"
[docs]class SparseVector(RegularField): """Record sparse vectors of float values.""" KEY = "sparse_vector"
[docs]class SearchAsYouType(RegularField): """A text-like field optimized for queries to implement as-you-type completion""" KEY = "search_as_you_type"
[docs]class Alias(RegularField): """Defines an alias to an existing field.""" KEY = "alias"
[docs]class Flattened(RegularField): """Allows an entire JSON object to be indexed as a single field.""" KEY = "flattened"
[docs]class Shape(RegularField): """For arbitrary cartesian geometries.""" KEY = "shape"
[docs]class Histogram(RegularField): """For pre-aggregated numerical values for percentiles aggregations.""" KEY = "histogram"