Field data types
Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability This functionality is generally available and ready for production usage. Serverless interfaces and procedures might differ from classic Elastic Stack deployments. The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Serverless
Generally available
Stack
Generally available
Each field has a field data type, or field type. This type indicates the kind of data the field contains, such as strings or boolean values, and its intended use. For example, you can index strings to both text and keyword fields. However, text field values are analyzed for full-text search while keyword strings are left as-is for filtering and sorting.
Field types are grouped by family. Types in the same family have exactly the same search behavior but may have different space usage or performance characteristics.
Currently, there are two type families, keyword and text. Other type families have only a single field type. For example, the boolean type family consists of one field type: boolean.
binary- Binary value encoded as a Base64 string.
booleantrueandfalsevalues.- Keywords
- The keyword family, including
keyword,constant_keyword, andwildcard. - Numbers
- Numeric types, such as
longanddouble, used to express amounts. - Dates
- Date types, including
dateanddate_nanos. alias- Defines an alias for an existing field.
object- A JSON object.
flattened- An entire JSON object as a single field value.
nested- A JSON object that preserves the relationship between its subfields.
join- Defines a parent/child relationship for documents in the same index.
passthrough- Provides aliases for sub-fields at the same level.
- Range
- Range types, such as
long_range,double_range,date_range, andip_range. ip- IPv4 and IPv6 addresses.
version- Software versions. Supports Semantic Versioning precedence rules.
murmur3- Compute and stores hashes of values.
aggregate_metric_double- Pre-aggregated metric values.
histogram- Pre-aggregated numerical values in the form of a T-Digest or HDRhistogram.
exponential_histogram- Pre-aggregated numerical values in the form of an exponential histogram.
tdigestThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.4 This functionality is generally available and ready for production usage. Preview in 9.3 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.- Pre-aggregated numerical values in the form of a T-Digest.
textfields- The text family, including
text,match_only_text, andpattern_text. Analyzed, unstructured text. annotated-text- Text containing special markup. Used for identifying named entities.
- [
completion] - Used for auto-complete suggestions. For more information about completion suggesters, refer to Suggester examples.
search_as_you_typetext-like type for as-you-type completion.semanticThe Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Preview since 9.5 This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes. Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud. Availability Preview This functionality is in technical preview and is ready for evaluation. Use with caution in production; it is not recommended for mission-critical workloads. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. Specific Support terms apply. Serverless interfaces and procedures might differ from classic Elastic Stack deployments.- Used for performing semantic search on multimodal content.
semantic_text- Used for performing semantic search on text.
token_count- A count of tokens in a text.
dense_vector- Records dense vectors of float values.
sparse_vector- Records sparse vectors of float values.
rank_vectors- Records multiple dense vectors per document for late-interaction (max-sim) reranking.
rank_feature- Records a numeric feature to boost hits at query time.
rank_features- Records numeric features to boost hits at query time.
geo_point- Latitude and longitude points.
geo_shape- Complex shapes, such as polygons.
point- Arbitrary cartesian points.
shape- Arbitrary cartesian geometries.
percolator- Indexes queries written in Query DSL.
In Elasticsearch, arrays do not require a dedicated field data type. Any field can contain zero or more values by default, however, all values in the array must be of the same field type. 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 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 field types support multi-fields via the fields parameter.