scripting.asciidoc 900 B

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