Skip to content

Commit f339df5

Browse files
authored
[DOCS] Clarify array is not a field datatype (#43931)
1 parent 8fd5d76 commit f339df5

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

docs/reference/mapping/types.asciidoc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ string:: <<text,`text`>> and <<keyword,`keyword`>>
1717

1818
[float]
1919
=== Complex datatypes
20-
21-
<<array>>:: Array support does not require a dedicated `type`
2220
<<object>>:: `object` for single JSON objects
2321
<<nested>>:: `nested` for arrays of JSON objects
2422

@@ -56,6 +54,12 @@ string:: <<text,`text`>> and <<keyword,`keyword`>>
5654

5755
<<flattened>>:: Allows an entire JSON object to be indexed as a single field.
5856

57+
[float]
58+
[[types-array-handling]]
59+
=== Arrays
60+
In {es}, arrays do not require a dedicated field datatype. Any field can contain
61+
zero or more values by default, however, all values in the array must be of the
62+
same datatype. See <<array>>.
5963

6064
[float]
6165
=== Multi-fields

docs/reference/mapping/types/array.asciidoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[[array]]
2-
=== Array datatype
2+
=== Arrays
33

4-
In Elasticsearch, there is no dedicated `array` type. Any field can contain
5-
zero or more values by default, however, all values in the array must be of
6-
the same datatype. For instance:
4+
In Elasticsearch, there is no dedicated `array` datatype. Any field can contain
5+
zero or more values by default, however, all values in the array must be of the
6+
same datatype. For instance:
77

88
* an array of strings: [ `"one"`, `"two"` ]
99
* an array of integers: [ `1`, `2` ]
@@ -81,6 +81,7 @@ GET my_index/_search
8181
<3> The second document contains no arrays, but can be indexed into the same fields.
8282
<4> The query looks for `elasticsearch` in the `tags` field, and matches both documents.
8383

84+
[[multi-value-fields-inverted-index]]
8485
.Multi-value fields and the inverted index
8586
****************************************************
8687

docs/reference/mapping/types/text.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ PUT my_index
3030
--------------------------------
3131
// CONSOLE
3232

33+
[[text-multi-fields]]
34+
==== Use a field as both text and keyword
3335
Sometimes it is useful to have both a full text (`text`) and a keyword
3436
(`keyword`) version of the same field: one for full text search and the
3537
other for aggregations and sorting. This can be achieved with

0 commit comments

Comments
 (0)