Skip to content

Commit 34ea103

Browse files
committed
[DOCS] Clarify array is not a field datatype (#43931)
1 parent 3d6ad59 commit 34ea103

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
@@ -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

@@ -54,6 +52,13 @@ string:: <<text,`text`>> and <<keyword,`keyword`>>
5452

5553
<<search-as-you-type>>:: A text-like field optimized for queries to implement as-you-type completion
5654

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

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)