scripting.asciidoc 924 B

12345678910111213141516171819202122
  1. [float]
  2. [[breaking_70_scripting_changes]]
  3. === Scripting changes
  4. [float]
  5. ==== getDate() and getDates() removed
  6. Fields of type `long` and `date` had `getDate()` and `getDates()` methods
  7. (for multi valued fields) to get an object with date specific helper methods
  8. for the current doc value. In 5.3.0, `date` fields were changed to expose
  9. this same date object directly when calling `doc["myfield"].value`, and
  10. the getter methods for date objects were deprecated. These methods have
  11. now been removed. Instead, use `.value` on `date` fields, or explicitly
  12. parse `long` fields into a date object using
  13. `Instance.ofEpochMillis(doc["myfield"].value)`.
  14. [float]
  15. ==== Script errors will return as `400` error codes
  16. Malformed scripts, either in search templates, ingest pipelines or search
  17. requests, return `400 - Bad request` while they would previously return
  18. `500 - Internal Server Error`. This also applies for stored scripts.