rest.asciidoc 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. [[breaking_50_rest_api_changes]]
  2. === REST API changes
  3. ==== id values longer than 512 bytes are rejected
  4. When specifying an `_id` value longer than 512 bytes, the request will be
  5. rejected.
  6. ==== `/_optimize` endpoint removed
  7. The deprecated `/_optimize` endpoint has been removed. The `/_forcemerge`
  8. endpoint should be used in lieu of optimize.
  9. The `GET` HTTP verb for `/_forcemerge` is no longer supported, please use the
  10. `POST` HTTP verb.
  11. ==== Index creation endpoint only accepts `PUT`
  12. It used to be possible to create an index by either calling `PUT index_name`
  13. or `POST index_name`. Only the former is now supported.
  14. ==== `HEAD {index}/{type}` replaced with `HEAD {index}/_mapping/{type}`
  15. The endpoint for checking whether a type exists has been changed from
  16. `{index}/{type}` to `{index}/_mapping/{type}` in order to prepare for the
  17. removal of types when `HEAD {index}/{id}` will be used to check whether a
  18. document exists in an index. The old endpoint will keep working until 6.0.
  19. ==== Removed `mem` section from `/_cluster/stats` response
  20. The `mem` section contained only the `total` value, which was actually the
  21. memory available throughout all nodes in the cluster. The section contains now
  22. `total`, `free`, `used`, `used_percent` and `free_percent`.
  23. ==== Revised node roles aggregate returned by `/_cluster/stats`
  24. The `client`, `master_only`, `data_only` and `master_data` fields have been
  25. removed in favor of `master`, `data`, `ingest` and `coordinating_only`. A
  26. node can contribute to multiple counts as it can have multiple roles. Every
  27. node is implicitly a coordinating node, so whenever a node has no explicit
  28. roles, it will be counted as coordinating only.
  29. ==== Removed shard `version` information from `/_cluster/state` routing table
  30. We now store allocation id's of shards in the cluster state and use that to
  31. select primary shards instead of the version information.
  32. ==== Node roles are not part of node attributes anymore
  33. Node roles are now returned in a specific section, called `roles`, as part of
  34. nodes stats and nodes info response. The new section is an array that holds all
  35. the different roles that each node fulfills. In case the array is returned
  36. empty, that means that the node is a coordinating only node.
  37. ==== Forbid unquoted JSON
  38. Previously, JSON documents were allowed with unquoted field names, which isn't
  39. strictly JSON and broke some Elasticsearch clients. If documents were already
  40. indexed with unquoted fields in a previous vesrion of Elasticsearch, some
  41. operations may throw errors. To accompany this, a commented out JVM option has
  42. been added to the `jvm.options` file:
  43. `-Delasticsearch.json.allow_unquoted_field_names`.
  44. Note that this option is provided solely for migration purposes and will be
  45. removed in Elasticsearch 6.0.0.
  46. ==== Analyze API changes
  47. The `filters` and `char_filters` parameters have been renamed `filter` and `char_filter`.
  48. The `token_filters` parameter has been removed. Use `filter` instead.
  49. ==== `DELETE /_query` endpoint removed
  50. The `DELETE /_query` endpoint provided by the Delete-By-Query plugin has been
  51. removed and replaced by the <<docs-delete-by-query,Delete By Query API>>.
  52. ==== Create stored script endpoint removed
  53. The `PUT /_scripts/{lang}/{id}/_create` endpoint that previously allowed to create
  54. indexed scripts has been removed. Indexed scripts have been replaced
  55. by <<modules-scripting-stored-scripts,stored scripts>>.
  56. ==== Create stored template endpoint removed
  57. The `PUT /_search/template/{id}/_create` endpoint that previously allowed to create
  58. indexed template has been removed. Indexed templates have been replaced
  59. by <<pre-registered-templates, Pre-registered templates>>.
  60. ==== Remove properties support
  61. Some REST endpoints (e.g., cluster update index settings) supported detecting content in the Java
  62. properties format (line-delimited key=value pairs). This support has been removed.
  63. ==== `wait_for_relocating_shards` is now `wait_for_no_relocating_shards` in `/_cluster/health`
  64. The `wait_for_relocating_shards` parameter that used to take a number is now simply a boolean
  65. flag `wait_for_no_relocating_shards`, which if set to true, means the request will wait (up
  66. until the configured timeout) for the cluster to have no shard relocations before returning.
  67. Defaults to false, which means the operation will not wait.