[[mapping-types]] == Field datatypes Elasticsearch supports a number of different datatypes for the fields in a document: [float] === Core datatypes string:: <>, <> and <> <>:: `long`, `integer`, `short`, `byte`, `double`, `float`, `half_float`, `scaled_float` <>:: `date` <>:: `date_nanos` <>:: `boolean` <>:: `binary` <>:: `integer_range`, `float_range`, `long_range`, `double_range`, `date_range`, `ip_range` [float] === Complex datatypes <>:: `object` for single JSON objects <>:: `nested` for arrays of JSON objects [float] === Geo datatypes <>:: `geo_point` for lat/lon points <>:: `geo_shape` for complex shapes like polygons [float] === Specialised datatypes <>:: `ip` for IPv4 and IPv6 addresses <>:: `completion` to provide auto-complete suggestions <>:: `token_count` to count the number of tokens in a string {plugins}/mapper-murmur3.html[`mapper-murmur3`]:: `murmur3` to compute hashes of values at index-time and store them in the index {plugins}/mapper-annotated-text.html[`mapper-annotated-text`]:: `annotated-text` to index text containing special markup (typically used for identifying named entities) <>:: Accepts queries from the query-dsl <>:: Defines parent/child relation for documents within the same index <>:: Record numeric feature to boost hits at query time. <>:: Record numeric features to boost hits at query time. <>:: Record dense vectors of float values. <>:: A text-like field optimized for queries to implement as-you-type completion <>:: Defines an alias to an existing field. <>:: Allows an entire JSON object to be indexed as a single field. <>:: `shape` for arbitrary cartesian geometries. <>:: `histogram` for pre-aggregated numerical values for percentiles aggregations. <>:: Specialization of `keyword` for the case when all documents have the same value. [float] [[types-array-handling]] === Arrays In {es}, arrays do not require a dedicated field datatype. Any field can contain zero or more values by default, however, all values in the array must be of the same datatype. See <>. [float] === Multi-fields It is often useful to index the same field in different ways for different purposes. For instance, a `string` field could be mapped as a `text` field for full-text search, and as a `keyword` field for sorting or aggregations. Alternatively, you could index a text field with the <>, the <> analyzer, and the <>. This is the purpose of _multi-fields_. Most datatypes support multi-fields via the <> parameter. include::types/alias.asciidoc[] include::types/array.asciidoc[] include::types/binary.asciidoc[] include::types/boolean.asciidoc[] include::types/date.asciidoc[] include::types/date_nanos.asciidoc[] include::types/dense-vector.asciidoc[] include::types/histogram.asciidoc[] include::types/flattened.asciidoc[] include::types/geo-point.asciidoc[] include::types/geo-shape.asciidoc[] include::types/ip.asciidoc[] include::types/parent-join.asciidoc[] include::types/keyword.asciidoc[] include::types/nested.asciidoc[] include::types/numeric.asciidoc[] include::types/object.asciidoc[] include::types/percolator.asciidoc[] include::types/range.asciidoc[] include::types/rank-feature.asciidoc[] include::types/rank-features.asciidoc[] include::types/search-as-you-type.asciidoc[] include::types/text.asciidoc[] include::types/token-count.asciidoc[] include::types/shape.asciidoc[] include::types/constant-keyword.asciidoc[] include::types/wildcard.asciidoc[]