IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Field datatypes
editField datatypes
editElasticsearch supports a number of different datatypes for the fields in a document:
Core datatypes
editComplex datatypes
editGeo datatypes
editSpecialised datatypes
edit- IP
-
ip
for IPv4 and IPv6 addresses - Completion datatype
-
completion
to provide auto-complete suggestions - Token count
-
token_count
to count the number of tokens in a string -
mapper-murmur3
-
murmur3
to compute hashes of values at index-time and store them in the index -
mapper-annotated-text
-
annotated-text
to index text containing special markup (typically used for identifying named entities) - Percolator
- Accepts queries from the query-dsl
- Join
- Defines parent/child relation for documents within the same index
- Alias
- Defines an alias to an existing field.
- Rank feature
- Record numeric feature to boost hits at query time.
- Rank features
- Record numeric features to boost hits at query time.
- Dense vector
- Record dense vectors of float values.
- Sparse vector
- Record sparse vectors of float values.
- Search-as-you-type
- A text-like field optimized for queries to implement as-you-type completion
Arrays
editIn 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.
Multi-fields
editIt 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 standard
analyzer, the
english
analyzer, and the
french
analyzer.
This is the purpose of multi-fields. Most datatypes support multi-fields
via the fields
parameter.