| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 | [[mapping-types]]== Field datatypesElasticsearch supports a number of different datatypes for the fields in adocument:[float]=== Core datatypesstring::         <<text,`text`>> and <<keyword,`keyword`>><<number>>::     `long`, `integer`, `short`, `byte`, `double`, `float`, `half_float`, `scaled_float`<<date>>::       `date`<<date_nanos>>:: `date_nanos`<<boolean>>::    `boolean`<<binary>>::     `binary`<<range>>::      `integer_range`, `float_range`, `long_range`, `double_range`, `date_range`[float]=== Complex datatypes<<object>>::    `object` for single JSON objects<<nested>>::    `nested` for arrays of JSON objects[float]=== Geo datatypes<<geo-point>>::     `geo_point` for lat/lon points<<geo-shape>>::     `geo_shape` for complex shapes like polygons[float]=== Specialised datatypes<<ip>>::            `ip` for IPv4 and IPv6 addresses<<completion-suggester,Completion datatype>>::                    `completion` to provide auto-complete suggestions<<token-count>>::   `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)<<percolator>>::    Accepts queries from the query-dsl<<parent-join>>::   Defines parent/child relation for documents within the same index<<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<<alias>>::         Defines an alias to an existing field.<<flattened>>:: Allows an entire JSON object to be indexed as a single field.<<shape>>:: `shape` for arbitrary cartesian geometries.[float][[types-array-handling]]=== ArraysIn {es}, arrays do not require a dedicated field datatype. Any field can containzero or more values by default, however, all values in the array must be of thesame datatype. See <<array>>.[float]=== Multi-fieldsIt is often useful to index the same field in different ways for differentpurposes. For instance, a `string` field could be mapped asa `text` field for full-text search, and as a `keyword` field forsorting or aggregations.  Alternatively, you could index a text field withthe <<analysis-standard-analyzer,`standard` analyzer>>, the<<english-analyzer,`english`>> analyzer, and the<<french-analyzer,`french` analyzer>>.This is the purpose of _multi-fields_.  Most datatypes support multi-fieldsvia the <<multi-fields>> 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/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/sparse-vector.asciidoc[]include::types/text.asciidoc[]include::types/token-count.asciidoc[]include::types/shape.asciidoc[]
 |