Skip to content

Commit

Permalink
Add migration info for missing values in script
Browse files Browse the repository at this point in the history
Relates to #30975
  • Loading branch information
mayya-sharipova committed Oct 3, 2018
1 parent 3c1fdc9 commit 8f10c77
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/reference/migration/migrate_7_0/scripting.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8f10c77

Please sign in to comment.