diff --git a/docs/reference/migration/migrate_7_0/scripting.asciidoc b/docs/reference/migration/migrate_7_0/scripting.asciidoc index de312c1c7231c..01d8805c89667 100644 --- a/docs/reference/migration/migrate_7_0/scripting.asciidoc +++ b/docs/reference/migration/migrate_7_0/scripting.asciidoc @@ -14,6 +14,15 @@ now been removed. Instead, use `.value` on `date` fields, or explicitly parse `long` fields into a date object using `Instance.ofEpochMillis(doc["myfield"].value)`. +[float] +==== Accessing missing document values will throw an error +`doc['field'].value` will throw an exception if +the document is missing a value for the field `field`. + +To check if a document is missing a value, you can use +`doc['field'].size() == 0`. + + [float] ==== Script errors will return as `400` error codes