Skip to content

Commit 6f4bd2d

Browse files
mayya-sharipovakcm
authored andcommitted
Add migration info for missing values in script
Relates to #30975
1 parent 5f98ab3 commit 6f4bd2d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/reference/migration/migrate_7_0/scripting.asciidoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ now been removed. Instead, use `.value` on `date` fields, or explicitly
1414
parse `long` fields into a date object using
1515
`Instance.ofEpochMillis(doc["myfield"].value)`.
1616

17+
[float]
18+
==== Accessing missing document values will throw an error
19+
`doc['field'].value` will throw an exception if
20+
the document is missing a value for the field `field`.
21+
22+
To check if a document is missing a value, you can use
23+
`doc['field'].size() == 0`.
24+
25+
1726
[float]
1827
==== Script errors will return as `400` error codes
1928

0 commit comments

Comments
 (0)