Skip to content

Commit a9d2aec

Browse files
authored
Docs: ESQL doesn't preserve nulls in a list (#114335) (#114339)
The doc values don't preserve `null`s in a list so ESQL doesn't either. Closes #114324
1 parent f1901b0 commit a9d2aec

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/reference/esql/multivalued-fields.asciidoc

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,37 @@ POST /_query
177177
----
178178
// TESTRESPONSE[s/"took": 28/"took": "$body.took"/]
179179

180+
[discrete]
181+
[[esql-multivalued-nulls]]
182+
==== `null` in a list
183+
184+
`null` values in a list are not preserved at the storage layer:
185+
186+
[source,console,id=esql-multivalued-fields-multivalued-nulls]
187+
----
188+
POST /mv/_doc?refresh
189+
{ "a": [2, null, 1] }
190+
191+
POST /_query
192+
{
193+
"query": "FROM mv | LIMIT 1"
194+
}
195+
----
196+
197+
[source,console-result]
198+
----
199+
{
200+
"took": 28,
201+
"columns": [
202+
{ "name": "a", "type": "long"},
203+
],
204+
"values": [
205+
[[1, 2]],
206+
]
207+
}
208+
----
209+
// TESTRESPONSE[s/"took": 28/"took": "$body.took"/]
210+
180211
[discrete]
181212
[[esql-multivalued-fields-functions]]
182213
==== Functions

0 commit comments

Comments
 (0)