Skip to content

Commit 329c628

Browse files
committed
[DOCS] Clarify array is not a field datatype (#43931)
1 parent cfa1b45 commit 329c628

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

docs/reference/mapping/types.asciidoc

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

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

@@ -40,6 +38,13 @@ string:: <<text,`text`>> and <<keyword,`keyword`>>
4038

4139
<<parent-join>>:: Defines parent/child relation for documents within the same index
4240

41+
[float]
42+
[[types-array-handling]]
43+
=== Arrays
44+
In {es}, arrays do not require a dedicated field datatype. Any field can contain
45+
zero or more values by default, however, all values in the array must be of the
46+
same datatype. See <<array>>.
47+
4348
[float]
4449
=== Multi-fields
4550

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
@@ -32,6 +32,8 @@ PUT my_index
3232
--------------------------------
3333
// CONSOLE
3434

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

0 commit comments

Comments
 (0)