WARNING: Version 6.1 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Elasticsearch supports a number of different datatypes for the fields in a document:
- IP datatype
ipfor IPv4 and IPv6 addresses
- Completion datatype
completionto provide auto-complete suggestions
- Token count datatype
token_countto count the number of tokens in a string
murmur3to compute hashes of values at index-time and store them in the index
- Percolator type
- Accepts queries from the query-dsl
- Defines parent/child relation for documents within the same index
In Elasticsearch, 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 Arrays.
It is often useful to index the same field in different ways for different
purposes. For instance, a
string field could be mapped as
text field for full-text search, and as a
keyword field for
sorting or aggregations. Alternatively, you could index a text field with
standard analyzer, the
english analyzer, and the
This is the purpose of multi-fields. Most datatypes support multi-fields