api.asciidoc 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. [float]
  2. [[breaking_70_api_changes]]
  3. === API changes
  4. [float]
  5. ==== Internal Versioning is no longer supported for optimistic concurrency control
  6. Elasticsearch maintains a numeric version field for each document it stores. That field
  7. is incremented by one with every change to the document. Until 7.0.0 the API allowed using
  8. that field for optimistic concurrency control, i.e., making a write operation conditional
  9. on the current document version. Sadly, that approach is flawed because the value of the
  10. version doesn't always uniquely represent a change to the document. If a primary fails
  11. while handling a write operation, it may expose a version that will then be reused by the
  12. new primary.
  13. Due to that issue, internal versioning can no longer be used and is replaced by a new
  14. method based on sequence numbers. See <<optimistic-concurrency-control>> for more details.
  15. Note that the `external` versioning type is still fully supported.
  16. [float]
  17. ==== Camel case and underscore parameters deprecated in 6.x have been removed
  18. A number of duplicate parameters deprecated in 6.x have been removed from
  19. Bulk request, Multi Get request, Term Vectors request, and More Like This Query
  20. requests.
  21. The following camel case parameters have been removed:
  22. * `opType`
  23. * `versionType`, `_versionType`
  24. The following parameters starting with underscore have been removed:
  25. * `_parent`
  26. * `_retry_on_conflict`
  27. * `_routing`
  28. * `_version`
  29. * `_version_type`
  30. Instead of these removed parameters, use their non camel case equivalents without
  31. starting underscore, e.g. use `version_type` instead of `_version_type` or `versionType`.
  32. [float]
  33. ==== Thread pool info
  34. In previous versions of Elasticsearch, the thread pool info returned in the
  35. <<cluster-nodes-info,nodes info API>> returned `min` and `max` values reflecting
  36. the configured minimum and maximum number of threads that could be in each
  37. thread pool. The trouble with this representation is that it does not align with
  38. the configuration parameters used to configure thread pools. For
  39. <<modules-threadpool,scaling thread pools>>, the minimum number of threads is
  40. configured by a parameter called `core` and the maximum number of threads is
  41. configured by a parameter called `max`. For <<modules-threadpool,fixed thread
  42. pools>>, there is only one configuration parameter along these lines and that
  43. parameter is called `size`, reflecting the fixed number of threads in the
  44. pool. This discrepancy between the API and the configuration parameters has been
  45. rectified. Now, the API will report `core` and `max` for scaling thread pools,
  46. and `size` for fixed thread pools.
  47. Similarly, in the cat thread pool API the existing `size` output has been
  48. renamed to `pool_size` which reflects the number of threads currently in the
  49. pool; the shortcut for this value has been changed from `s` to `psz`. The `min`
  50. output has been renamed to `core` with a shortcut of `cr`, the shortcut for
  51. `max` has been changed to `mx`, and the `size` output with a shortcut of `sz`
  52. has been reused to report the configured number of threads in the pool. This
  53. aligns the output of the API with the configuration values for thread
  54. pools. Note that `core` and `max` will be populated for scaling thread pools,
  55. and `size` will be populated for fixed thread pools.
  56. [float]
  57. ==== The parameter `fields` deprecated in 6.x has been removed from Bulk request
  58. and Update request. The Update API returns `400 - Bad request` if request contains
  59. unknown parameters (instead of ignored in the previous version).
  60. [float]
  61. [[remove-suggest-metric]]
  62. ==== Remove support for `suggest` metric/index metric in indices stats and nodes stats APIs
  63. Previously, `suggest` stats were folded into `search` stats. Support for the
  64. `suggest` metric on the indices stats and nodes stats APIs remained for
  65. backwards compatibility. Backwards support for the `suggest` metric was
  66. deprecated in 6.3.0 and now removed in 7.0.0.
  67. [[remove-field-caps-body]]
  68. In the past, `fields` could be provided either as a parameter, or as part of the request
  69. body. Specifying `fields` in the request body as opposed to a parameter was deprecated
  70. in 6.4.0, and is now unsupported in 7.0.0.
  71. [float]
  72. ==== `copy_settings` is deprecated on shrink and split APIs
  73. Versions of Elasticsearch prior to 6.4.0 did not copy index settings on shrink
  74. and split operations. Starting with Elasticsearch 7.0.0, the default behavior
  75. will be for such settings to be copied on such operations. To enable users in
  76. 6.4.0 to transition in 6.4.0 to the default behavior in 7.0.0, the
  77. `copy_settings` parameter was added on the REST layer. As this behavior will be
  78. the only behavior in 8.0.0, this parameter is deprecated in 7.0.0 for removal in
  79. 8.0.0.
  80. [float]
  81. ==== The deprecated stored script contexts have now been removed
  82. When putting stored scripts, support for storing them with the deprecated `template` context or without a context is
  83. now removed. Scripts must be stored using the `script` context as mentioned in the documentation.
  84. [float]
  85. ==== Removed Get Aliases API limitations when {security-features} are enabled
  86. The behavior and response codes of the get aliases API no longer vary
  87. depending on whether {security-features} are enabled. Previously a
  88. 404 - NOT FOUND (IndexNotFoundException) could be returned in case the
  89. current user was not authorized for any alias. An empty response with
  90. status 200 - OK is now returned instead at all times.
  91. [float]
  92. ==== Put User API response no longer has `user` object
  93. The Put User API response was changed in 6.5.0 to add the `created` field
  94. outside of the user object where it previously had been. In 7.0.0 the user
  95. object has been removed in favor of the top level `created` field.
  96. [float]
  97. ==== Source filtering url parameters `_source_include` and `_source_exclude` have been removed
  98. The deprecated in 6.x url parameters are now removed. Use `_source_includes` and `_source_excludes` instead.
  99. [float]
  100. ==== Multi Search Request metadata validation
  101. MultiSearchRequests issued through `_msearch` now validate all keys in the metadata section. Previously unknown keys were ignored
  102. while now an exception is thrown.
  103. [float]
  104. ==== Deprecated graph endpoints removed
  105. The deprecated graph endpoints (those with `/_graph/_explore`) have been
  106. removed.
  107. [float]
  108. ==== Deprecated `_termvector` endpoint removed
  109. The `_termvector` endpoint was deprecated in 2.0 and has now been removed.
  110. The endpoint `_termvectors` (plural) should be used instead.
  111. [float]
  112. ==== When {security-features} are enabled, index monitoring APIs over restricted indices are not authorized implicitly anymore
  113. Restricted indices (currently only `.security-6` and `.security`) are special internal
  114. indices that require setting the `allow_restricted_indices` flag on every index
  115. permission that covers them. If this flag is `false` (default) the permission
  116. will not cover these and actions against them will not be authorized.
  117. However, the monitoring APIs were the only exception to this rule. This exception
  118. has been forfeited and index monitoring privileges have to be granted explicitly,
  119. using the `allow_restricted_indices` flag on the permission (as any other index
  120. privilege).