rest-api-changes.asciidoc 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155
  1. [discrete]
  2. [[breaking_80_rest_api_changes]]
  3. ==== REST API changes
  4. .REST API endpoints containing `_xpack` have been removed.
  5. [%collapsible]
  6. ====
  7. *Details* +
  8. In 7.0, we deprecated REST endpoints that contain `_xpack` in their path. These
  9. endpoints are now removed in 8.0. Each endpoint that was deprecated and removed
  10. is replaced with a new endpoint that does not contain `_xpack`. As an example,
  11. `/{index}/_xpack/graph/_explore` is replaced by `/{index}/_graph/explore`.
  12. *Impact* +
  13. Use the replacement REST API endpoints. Requests submitted to the `_xpack`
  14. API endpoints will return an error.
  15. *Compatibility* +
  16. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  17. {ref}/rest-api-compatibility.html[requested], any requests that include
  18. the`_xpack` prefix are rerouted to the corresponding URL without the `_xpack`
  19. prefix.
  20. ====
  21. [[remove-mapping-type-api-endpoints]]
  22. .REST API endpoints containing mapping types have been removed.
  23. [%collapsible]
  24. ====
  25. *Details* +
  26. Mapping types have been removed. API endpoints that contain a mapping type have
  27. also been removed. Use a typeless endpoint instead.
  28. [options="header",cols="<1,<3,<1"]
  29. |====
  30. | API | Typed API endpoint | Typeless API endpoint
  31. | {ref}/docs-bulk.html[Bulk]
  32. | `<target>/<type>/_bulk`
  33. | `<target>/_bulk`
  34. | {ref}/search-count.html[Count]
  35. | `<target>/<type>/_count`
  36. | `<target>/_count`
  37. | {ref}/docs-delete.html[Delete]
  38. | `<index>/<type>/<_id>`
  39. | `<index>/_doc/<_id>`
  40. | {ref}/docs-delete-by-query.html[Delete by query]
  41. | `<target>/<type>/_delete_by_query`
  42. | `<target>/_delete_by_query`
  43. | {ref}/search-explain.html[Explain]
  44. | `<index>/<type>/<_id>/_explain`
  45. | `<index>/_explain/<_id>`
  46. | {ref}/docs-get.html[Get]
  47. | `<index>/<type>/<_id>`
  48. | `<index>/_doc/<_id>`
  49. |
  50. | `<index>/<type>/<_id>/_source`
  51. | `<index>/_source/<_id>`
  52. | {ref}/indices-get-field-mapping.html[Get field mapping]
  53. | `_mapping/<type>/field/<field>`
  54. | `_mapping/field/<field>`
  55. |
  56. | `<target>/_mapping/<type>/field/<field>`
  57. | `<target>/_mapping/field/<field>`
  58. | {ref}/indices-get-mapping.html[Get mapping]
  59. | `_mapping/<type>`
  60. | `_mapping` or `<target>/_mapping`
  61. |
  62. | `<target>/<type>/_mapping`
  63. | `<target>/_mapping`
  64. |
  65. | `<target>/_mapping/<type>`
  66. | `<target>/_mapping`
  67. | {ref}/graph-explore-api.html[Graph explore]
  68. | `<index>/<type>/_graph/explore`
  69. | `<index>/_graph/explore`
  70. | {ref}/docs-index_.html[Index]
  71. | `<target>/<type>/<_id>/_create`
  72. | `<target>/_create/<_id>`
  73. |
  74. | `<target>/<type>`
  75. | `<target>/_doc`
  76. |
  77. | `<target>/<type>/<_id>`
  78. | `<target>/_doc/<_id>`
  79. | {ref}/docs-multi-get.html[Multi get]
  80. | `<index>/<type>/_mget`
  81. | `<index>/_mget`
  82. | {ref}/search-multi-search.html[Multi search]
  83. | `<target>/<type>/_msearch`
  84. | `<target>/_msearch`
  85. | {ref}/multi-search-template.html[Multi search template]
  86. | `<target>/<type>/_msearch/template`
  87. | `<target>/_msearch/template`
  88. | {ref}/docs-multi-termvectors.html[Multi term vectors]
  89. | `<index>/<type>/_mtermvectors`
  90. | `<index>/_mtermvectors`
  91. | {ref}/rollup-search.html[Rollup search]
  92. | `<target>/<type>/_rollup_search`
  93. | `<target>/_rollup_search`
  94. | {ref}/search-search.html[Search]
  95. | `<target>/<type>/_search`
  96. | `<target>/_search`
  97. | {ref}/search-template-api.html[Search template]
  98. | `<target>/<type>/_search/template`
  99. | `<target>/_search/template`
  100. | {ref}/docs-termvectors.html[Term vectors]
  101. | `<index>/<mapping_type>/<_id>/_termvectors`
  102. | `<index>/_termvectors<_id>`
  103. |
  104. | `<index>/<mapping_type>/_termvectors`
  105. | `<index>/_termvectors`
  106. | {ref}/docs-update.html[Update]
  107. | `<index>/<type>/<_id>/_update`
  108. | `<index>/_update/<_id>`
  109. | {ref}/docs-update-by-query.html[Update by query]
  110. | `<target>/<type>/_update_by_query`
  111. | `<target>/_update_by_query`
  112. | {ref}/indices-put-mapping.html[Update mapping]
  113. | `<target>/<type>/_mapping`
  114. | `<target>/_mapping`
  115. |
  116. | `<target>/_mapping/<type>`
  117. | `<target>/_mapping`
  118. |
  119. | `_mapping/<type>`
  120. | `<target>/_mapping`
  121. | {ref}/search-validate.html[Validate]
  122. | `<target>/<type>/_validate/query`
  123. | `<target>/_validate/query`
  124. |====
  125. *Impact* +
  126. Update your application to use typeless REST API endpoints. Requests to
  127. endpoints that contain a mapping type will return an error.
  128. *Compatibility* +
  129. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  130. {ref}/rest-api-compatibility.html[requested], if a request includes a custom
  131. mapping type it is ignored. The request is rerouted to the corresponding
  132. typeless URL. Custom mapping types in request bodies and type related HTTP
  133. parameters are ignored, and responses, where warranted, include `_type` :
  134. `_doc`.
  135. ====
  136. .{ccs-cap} ({ccs-init}) is now only backward-compatible with the previous minor version.
  137. [%collapsible]
  138. ====
  139. *Details* +
  140. In 8.0+, Elastic supports searches from a local cluster to a remote cluster
  141. running:
  142. * The previous minor version.
  143. * The same version.
  144. * A newer minor version in the same major version.
  145. Elastic also supports searches from a local cluster running the last minor
  146. version of a major version to a remote cluster running any minor version in the
  147. following major version. For example, a local 7.17 cluster can search any
  148. remote 8.x cluster.
  149. include::{es-ref-dir}/search/search-your-data/ccs-version-compat-matrix.asciidoc[]
  150. IMPORTANT: For the {ref}/eql-search-api.html[EQL search API], the local and
  151. remote clusters must use the same {es} version if they have versions prior to 7.17.7 (included) or prior to 8.5.1 (included).
  152. For example, a local 8.0 cluster can search a remote 7.17 or any remote 8.x
  153. cluster. However, a search from a local 8.0 cluster to a remote 7.16 or 6.8
  154. cluster is not supported.
  155. Previously, we also supported searches on remote clusters running:
  156. * Any minor version of the local cluster's major version.
  157. * The last minor release of the previous major version.
  158. However, such searches can result in undefined behavior.
  159. *Impact* +
  160. If you only run cross-cluster searches on remote clusters using the same or a
  161. newer version, no changes are needed.
  162. If you previously searched remote clusters running an earlier version of {es},
  163. see {ref}/modules-cross-cluster-search.html#ensure-ccs-support[Ensure {ccs}
  164. support] for recommended solutions.
  165. A {ccs} using an unsupported configuration may still work. However, such
  166. searches aren't tested by Elastic, and their behavior isn't guaranteed.
  167. ====
  168. [[remove-term-order-key]]
  169. .The `terms` aggregation no longer supports the `_term` order key.
  170. [%collapsible]
  171. ====
  172. *Details* +
  173. The `terms` aggregation no longer supports the `_term` key in `order` values. To
  174. sort buckets by their term, use `_key` instead.
  175. *Impact* +
  176. Discontinue use of the `_term` order key. Requests that include a `_term` order
  177. key will return an error.
  178. *Compatibility* +
  179. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  180. {ref}/rest-api-compatibility.html[requested], the `_term` order is ignored and
  181. `key` is used instead.
  182. ====
  183. [[remove-time-order-key]]
  184. .The `date_histogram` aggregation no longer supports the `_time` order key.
  185. [%collapsible]
  186. ====
  187. *Details* +
  188. The `date_histogram` aggregation no longer supports the `_time` key in `order`
  189. values. To sort buckets by their key, use `_key` instead.
  190. *Impact* +
  191. Discontinue use of the `_time` order key. Requests that include a `_time` order
  192. key will return an error.
  193. *Compatibility* +
  194. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  195. {ref}/rest-api-compatibility.html[requested], the `_time` order is ignored and
  196. `_key` is used instead.
  197. ====
  198. [[remove-moving-avg-agg]]
  199. .The `moving_avg` aggregation has been removed.
  200. [%collapsible]
  201. ====
  202. *Details* +
  203. The `moving_avg` aggregation was deprecated in 6.4 and has been removed. To
  204. calculate moving averages, use the
  205. {ref}/search-aggregations-pipeline-movfn-aggregation.html[`moving_fn`
  206. aggregation] instead.
  207. *Impact* +
  208. Discontinue use of the `moving_avg` aggregation. Requests that include the
  209. `moving_avg` aggregation will return an error.
  210. ====
  211. [[percentile-duplication]]
  212. .The `percentiles` aggregation's `percents` parameter no longer supports duplicate values.
  213. [%collapsible]
  214. ====
  215. *Details* +
  216. If you specify the `percents` parameter with the
  217. {ref}/search-aggregations-metrics-percentile-aggregation.html[`percentiles` aggregation],
  218. its values must be unique. Otherwise, an exception occurs.
  219. *Impact* +
  220. Use unique values in the `percents` parameter of the `percentiles` aggregation.
  221. Requests containing duplicate values in the `percents` parameter will return
  222. an error.
  223. ====
  224. [[date-histogram-interval]]
  225. .The `date_histogram` aggregation's `interval` parameter is no longer valid.
  226. [%collapsible]
  227. ====
  228. *Details* +
  229. It is now an error to specify the `interval` parameter to the
  230. {ref}/search-aggregations-bucket-datehistogram-aggregation.html[`date_histogram`
  231. aggregation] or the
  232. {ref}/search-aggregations-bucket-composite-aggregation.html#_date_histogram[`composite
  233. date_histogram` source. Instead, please use either `calendar_interval` or
  234. `fixed_interval` as appropriate.
  235. *Impact* +
  236. Uses of the `interval` parameter in either the `date_histogram` aggregation or
  237. the `date_histogram` composite source will now generate an error. Instead
  238. please use the more specific `fixed_interval` or `calendar_interval`
  239. parameters.
  240. *Compatibility* +
  241. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  242. {ref}/rest-api-compatibility.html[requested], the `interval` parameter is
  243. adapted to either a fixed or calendar interval.
  244. ====
  245. [[ngram-edgengram-filter-names-removed]]
  246. .The `nGram` and `edgeNGram` token filter names have been removed.
  247. [%collapsible]
  248. ====
  249. *Details* +
  250. The `nGram` and `edgeNGram` token filter names that have been deprecated since
  251. version 6.4 have been removed. Both token filters can only be used by their
  252. alternative names `ngram` and `edge_ngram` since version 7.0.
  253. *Impact* +
  254. Use the equivalent `ngram` and `edge_ngram` token filters. Requests containing
  255. the `nGram` and `edgeNGram` token filter names will return an error.
  256. ====
  257. [[nGram-edgeNGram-tokenizer-dreprecation]]
  258. .The `nGram` and `edgeNGram` tokenizer names have been removed.
  259. [%collapsible]
  260. ====
  261. *Details* +
  262. The `nGram` and `edgeNGram` tokenizer names haven been deprecated with 7.6 and are no longer
  263. supported on new indices. Mappings for indices created after 7.6 will continue to work but
  264. emit a deprecation warning. The tokenizer name should be changed to the fully equivalent
  265. `ngram` or `edge_ngram` names for new indices and in index templates.
  266. *Impact* +
  267. Use the `ngram` and `edge_ngram` tokenizers. Requests to create new indices
  268. using the `nGram` and `edgeNGram` tokenizer names will return an error.
  269. ====
  270. .The `in_flight_requests` stat has been renamed `inflight_requests` in logs and diagnostic APIs.
  271. [%collapsible]
  272. ====
  273. *Details* +
  274. The name of the in flight requests circuit breaker in log output and diagnostic APIs (such as the node stats API) changes from `in_flight_requests` to `inflight_requests` to align it with the name of the corresponding settings.
  275. *Impact* +
  276. Update your workflow and applications to use the `inflight_requests` stat in
  277. place of `in_flight_requests`.
  278. ====
  279. .The voting configuration exclusions API endpoint has changed.
  280. [%collapsible]
  281. ====
  282. *Details* +
  283. The `POST /_cluster/voting_config_exclusions/{node_filter}` API has been
  284. removed in favour of `POST /_cluster/voting_config_exclusions?node_names=...`
  285. and `POST /_cluster/voting_config_exclusions?node_ids=...` which allow you to
  286. specify the names or IDs of the nodes to exclude.
  287. *Impact* +
  288. Use `POST /_cluster/voting_config_exclusions?node_ids=...` and specify the nodes
  289. to exclude instead of using a node filter. Requests submitted to the
  290. `/_cluster/voting_config_exclusions/{node_filter}` endpoint will return an
  291. error.
  292. ====
  293. .Remote system indices are not followed automatically if they match an auto-follow pattern.
  294. [%collapsible]
  295. ====
  296. *Details* +
  297. Remote system indices matching an {ref}/ccr-auto-follow.html[auto-follow
  298. pattern] won't be configured as a follower index automatically.
  299. *Impact* +
  300. Explicitly {ref}/ccr-put-follow.html[create a follower index] to follow a remote
  301. system index if that's the wanted behaviour.
  302. ====
  303. .The EQL `wildcard` function has been removed.
  304. [%collapsible]
  305. ====
  306. *Details* +
  307. The `wildcard` function was deprecated in {es} 7.13.0 and has been removed.
  308. *Impact* +
  309. Use the `like` or `regex` {ref}/eql-syntax.html#eql-syntax-pattern-comparison-keywords[keywords] instead.
  310. ====
  311. [[ilm-freeze-noop]]
  312. .The ILM `freeze` action is now a no-op.
  313. [%collapsible]
  314. ====
  315. *Details* +
  316. The ILM freeze action is now a no-op and performs no action on the index, as the freeze API endpoint
  317. has been removed in 8.0.
  318. *Impact* +
  319. Update your ILM policies to remove the `freeze` action from the `cold` phase.
  320. ====
  321. [[ilm-policy-validation]]
  322. .Additional validation for ILM policies.
  323. [%collapsible]
  324. ====
  325. *Details* +
  326. Creating or updating an ILM policy now requires that any referenced snapshot repositories and SLM
  327. policies exist.
  328. *Impact* +
  329. Update your code or configuration management to ensure that repositories and SLM policies are created
  330. before any policies that reference them.
  331. ====
  332. .The deprecated `_upgrade` API has been removed.
  333. [%collapsible]
  334. ====
  335. *Details* +
  336. Previously, the `_upgrade` API upgraded indices from the previous major
  337. version to the current version. The `_reindex` API should be used
  338. instead for that purpose.
  339. *Impact* +
  340. Requests made to the old `_upgrade` API will return an error.
  341. ====
  342. .The deprecated freeze index API has been removed.
  343. [%collapsible]
  344. ====
  345. *Details* +
  346. The freeze index API (`POST /<index>/_freeze`) has been removed.
  347. https://www.elastic.co/blog/significantly-decrease-your-elasticsearch-heap-memory-usage[Improvements
  348. in heap memory usage] have eliminated the reason to freeze indices.
  349. You can still unfreeze existing frozen indices using the
  350. {ref}/unfreeze-index-api.html[unfreeze index API]. For some use cases, the
  351. frozen tier may be a suitable replacement for frozen indices. See
  352. {ref}/data-tiers.html[data tiers] for more information.
  353. *Impact* +
  354. Requests made to the old freeze index API will return an error.
  355. ====
  356. .The force merge API's `max_num_segments` and `only_expunge_deletes` parameters cannot both be specified in the same request.
  357. [%collapsible]
  358. ====
  359. *Details* +
  360. Previously, the force merge API allowed the parameters `only_expunge_deletes`
  361. and `max_num_segments` to be set to a non default value at the same time. But
  362. the `max_num_segments` was silently ignored when `only_expunge_deletes` is set
  363. to `true`, leaving the false impression that it has been applied.
  364. *Impact* +
  365. When using the {ref}/indices-forcemerge.html[force merge API], do not specify
  366. values for both the `max_num_segments` and `only_expunge_deletes` parameters.
  367. Requests that include values for both parameters will return an error.
  368. ====
  369. .The create or update index template API's `template` parameter has been removed.
  370. [%collapsible]
  371. ====
  372. *Details* +
  373. In 6.0, we deprecated the `template` parameter in create or update index
  374. template requests in favor of using `index_patterns`. Support for the `template`
  375. parameter is now removed in 8.0.
  376. *Impact* +
  377. Use the {ref}/indices-templates-v1.html[create or update index template API]'s
  378. `index_patterns` parameter. Requests that include the `template` parameter will
  379. return an error.
  380. *Compatibility* +
  381. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  382. {ref}/rest-api-compatibility.html[requested], the `template` parameter is mapped
  383. to `index_patterns`.
  384. ====
  385. .Synced flush has been removed.
  386. [%collapsible]
  387. ====
  388. *Details* +
  389. Synced flush was deprecated in 7.6 and is removed in 8.0. Use a regular flush
  390. instead as it has the same effect as a synced flush in 7.6 and later.
  391. *Impact* +
  392. Use the {ref}/indices-flush.html[flush API]. Requests to the
  393. `/<index>/flush/synced` or `/flush/synced` endpoints will return an error.
  394. *Compatibility* +
  395. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  396. {ref}/rest-api-compatibility.html[requested], the request to synced flush is
  397. routed to the equivalent non-synced flush URL.
  398. ====
  399. .The default for the `?wait_for_active_shards` parameter on the close index API has changed.
  400. [%collapsible]
  401. ====
  402. *Details* +
  403. When closing an index in earlier versions, by default {es} would not wait for
  404. the shards of the closed index to be properly assigned before returning. From
  405. version 8.0 onwards the default behaviour is to wait for shards to be assigned
  406. according to the
  407. {ref}/docs-index_.html#index-wait-for-active-shards[`index.write.wait_for_active_shards`
  408. index setting].
  409. *Impact* +
  410. Accept the new behaviour, or specify `?wait_for_active_shards=0` to preserve
  411. the old behaviour if needed.
  412. ====
  413. .The index stats API's `types` query parameter has been removed.
  414. [%collapsible]
  415. ====
  416. *Details* +
  417. The index stats API's `types` query parameter has been removed. Previously, you
  418. could combine `types` with the `indexing` query parameter to return indexing
  419. stats for specific mapping types. Mapping types have been removed in 8.0.
  420. *Impact* +
  421. Discontinue use of the `types` query parameter. Requests that include the
  422. parameter will return an error.
  423. *Compatibility* +
  424. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  425. {ref}/rest-api-compatibility.html[requested], the `types` query parameter is
  426. ignored and stats are returned for the entire index.
  427. ====
  428. .The `user_agent` ingest processor's `ecs` parameter has no effect.
  429. [%collapsible]
  430. ====
  431. *Details* +
  432. In 7.2, we deprecated the `ecs` parameter for the `user_agent` ingest processor.
  433. In 8.x, the `user_agent` ingest processor will only return {ecs-ref}[Elastic
  434. Common Schema (ECS)] fields, regardless of the `ecs` value.
  435. *Impact* +
  436. To avoid deprecation warnings, remove the parameter from your ingest pipelines.
  437. If a pipeline specifies an `ecs` value, the value is ignored.
  438. ====
  439. .The `include_type_name` query parameter has been removed.
  440. [%collapsible]
  441. ====
  442. *Details* +
  443. The `include_type_name` query parameter has been removed from the index
  444. creation, index template, and mapping APIs. Previously, you could set
  445. `include_type_name` to `true` to indicate that requests and responses should
  446. include a mapping type name. Mapping types have been removed in 8.x.
  447. *Impact* +
  448. Discontinue use of the `include_type_name` query parameter. Requests that
  449. include the parameter will return an error.
  450. *Compatibility* +
  451. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  452. {ref}/rest-api-compatibility.html[requested], the `include_type_name` query
  453. parameter is ignored and any custom mapping types in the request are removed.
  454. ====
  455. .Reindex from remote now re-encodes URL-encoded index names.
  456. [%collapsible]
  457. ====
  458. *Details* +
  459. Reindex from remote would previously allow URL-encoded index names and not
  460. re-encode them when generating the search request for the remote host. This
  461. leniency has been removed such that all index names are correctly encoded when
  462. reindex generates remote search requests.
  463. *Impact* +
  464. Specify unencoded index names for reindex from remote requests.
  465. ====
  466. .In the reindex, delete by query, and update by query APIs, the `size` parameter has been renamed.
  467. [%collapsible]
  468. ====
  469. *Details* +
  470. Previously, a `_reindex` request had two different size specifications in the body:
  471. - Outer level, determining the maximum number of documents to process
  472. - Inside the `source` element, determining the scroll/batch size.
  473. The outer level `size` parameter has now been renamed to `max_docs` to
  474. avoid confusion and clarify its semantics.
  475. Similarly, the `size` parameter has been renamed to `max_docs` for
  476. `_delete_by_query` and `_update_by_query` to keep the 3 interfaces consistent.
  477. *Impact* +
  478. Use the replacement parameters. Requests containing the `size` parameter will
  479. return an error.
  480. *Compatibility* +
  481. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  482. {ref}/rest-api-compatibility.html[requested], the `size` parameter is mapped to
  483. the `max_docs` parameter.
  484. ====
  485. .The update by query API now rejects unsupported `script` fields.
  486. [%collapsible]
  487. ====
  488. *Details* +
  489. An update by query API request that includes an unsupported field in the
  490. `script` object now returns an error. Previously, the API would silently ignore
  491. these unsupported fields.
  492. *Impact* +
  493. To avoid errors, remove unsupported fields from the `script` object.
  494. ====
  495. .The cat node API's `local` query parameter has been removed.
  496. [%collapsible]
  497. ====
  498. *Details* +
  499. The `?local` parameter to the `GET _cat/nodes` API was deprecated in 7.x and is
  500. rejected in 8.0. This parameter caused the API to use the local cluster state
  501. to determine the nodes returned by the API rather than the cluster state from
  502. the master, but this API requests information from each selected node
  503. regardless of the `?local` parameter which means this API does not run in a
  504. fully node-local fashion.
  505. *Impact* +
  506. Discontinue use of the `?local` query parameter. {ref}/cat-nodes.html[cat node
  507. API] requests that include this parameter will return an error.
  508. ====
  509. .The cat shard API's `local` query parameter has been removed.
  510. [%collapsible]
  511. ====
  512. *Details* +
  513. The `?local` parameter to the `GET _cat/shards` API was deprecated in 7.x and is
  514. rejected in 8.0. This parameter caused the API to use the local cluster state
  515. to determine the nodes returned by the API rather than the cluster state from
  516. the master, but this API requests information from each selected node
  517. regardless of the `?local` parameter which means this API does not run in a
  518. fully node-local fashion.
  519. *Impact* +
  520. Discontinue use of the `?local` query parameter. {ref}/cat-shards.html[cat shards
  521. API] requests that include this parameter will return an error.
  522. ====
  523. .The cat indices API's `local` query parameter has been removed.
  524. [%collapsible]
  525. ====
  526. *Details* +
  527. The `?local` parameter to the `GET _cat/indices` API was deprecated in 7.x and is
  528. rejected in 8.0. This parameter caused the API to use the local cluster state
  529. to determine the nodes returned by the API rather than the cluster state from
  530. the master, but this API requests information from each selected node
  531. regardless of the `?local` parameter which means this API does not run in a
  532. fully node-local fashion.
  533. *Impact* +
  534. Discontinue use of the `?local` query parameter. {ref}/cat-indices.html[cat indices
  535. API] requests that include this parameter will return an error.
  536. ====
  537. .The get field mapping API's `local` query parameter has been removed.
  538. [%collapsible]
  539. ====
  540. *Details* +
  541. The `local` parameter for get field mapping API was deprecated in 7.8 and is
  542. removed in 8.0. This parameter is a no-op and field mappings are always retrieved
  543. locally.
  544. *Impact* +
  545. Discontinue use of the `local` query parameter.
  546. {ref}/indices-get-field-mapping.html[get field mapping API] requests that
  547. include this parameter will return an error.
  548. ====
  549. .Post data to jobs API is deprecated.
  550. [%collapsible]
  551. ====
  552. *Details* +
  553. The {ml} {ref}/ml-post-data.html[post data to jobs API] is deprecated starting in 7.11.0
  554. and will be removed in a future major version.
  555. *Impact* +
  556. Use {ref}/ml-ad-apis.html#ml-api-datafeed-endpoint[{dfeeds}] instead.
  557. ====
  558. .The `job_id` property of the Update {dfeeds} API has been removed.
  559. [%collapsible]
  560. ====
  561. *Details* +
  562. The ability to update a `job_id` in a {dfeed} was deprecated in 7.3.0. and is
  563. removed in 8.0.
  564. *Impact* +
  565. It is not possible to move {dfeeds} between {anomaly-jobs}.
  566. ====
  567. .Create repository and delete repository API's return `409` status code when a repository is in use instead of `500`.
  568. [%collapsible]
  569. ====
  570. *Details* +
  571. The {ref}/put-snapshot-repo-api.html[Create or update snapshot repository API] and
  572. {ref}/delete-snapshot-repo-api.html[Delete snapshot repository API] return `409`
  573. status code when the request is attempting to modify an existing repository that's in use instead of status code `500`.
  574. *Impact* +
  575. Update client code that handles creation and deletion of repositories to reflect this change.
  576. ====
  577. .The `allow_no_datafeeds` property has been removed from {ml} APIs.
  578. [%collapsible]
  579. ====
  580. *Details* +
  581. The `allow_no_datafeeds` property was deprecated in the
  582. {ref}/cat-datafeeds.html[cat {dfeeds}],
  583. {ref}/ml-get-datafeed.html[get {dfeeds}],
  584. {ref}/ml-get-datafeed-stats.html[get {dfeed} statistics], and
  585. {ref}/ml-stop-datafeed.html[stop {dfeeds}] APIs in 7.10.0.
  586. *Impact* +
  587. Use `allow_no_match` instead.
  588. ====
  589. .The `allow_no_jobs` property has been removed from {ml} APIs.
  590. [%collapsible]
  591. ====
  592. *Details* +
  593. The `allow_no_jobs` property was deprecated in the
  594. {ref}/cat-anomaly-detectors.html[cat anomaly detectors],
  595. {ref}/ml-close-job.html[close {anomaly-jobs}],
  596. {ref}/ml-get-job.html[get {anomaly-jobs}],
  597. {ref}/ml-get-job-stats.html[get {anomaly-job} statistics], and
  598. {ref}/ml-get-overall-buckets.html[get overall buckets] APIs in 7.10.0.
  599. *Impact* +
  600. Use `allow_no_match` instead.
  601. ====
  602. .The StartRollupJob endpoint now returns a success status if a job has already started.
  603. [%collapsible]
  604. ====
  605. *Details* +
  606. Previously, attempting to start an already-started rollup job would
  607. result in a `500 InternalServerError: Cannot start task for Rollup Job
  608. [job] because state was [STARTED]` exception.
  609. Now, attempting to start a job that is already started will just
  610. return a successful `200 OK: started` response.
  611. *Impact* +
  612. Update your workflow and applications to assume that a 200 status in response to
  613. attempting to start a rollup job means the job is in an actively started state.
  614. The request itself may have started the job, or it was previously running and so
  615. the request had no effect.
  616. ====
  617. .Stored scripts no longer support empty scripts or search templates.
  618. [%collapsible]
  619. ====
  620. *Details* +
  621. The {ref}/create-stored-script-api.html[create or update stored script API]'s
  622. `source` parameter cannot be empty.
  623. *Impact* +
  624. Before upgrading, use the {ref}/delete-stored-script-api.html[delete stored
  625. script API] to delete any empty stored scripts or search templates.
  626. In 8.0, {es} will drop any empty stored scripts or empty search templates from
  627. the cluster state. Requests to create a stored script or search template with
  628. an empty `source` will return an error.
  629. ====
  630. .The create or update stored script API's `code` parameter has been removed.
  631. [%collapsible]
  632. ====
  633. *Details* +
  634. The {ref}/create-stored-script-api.html[create or update stored script API]'s
  635. `code` parameter has been removed. Use the `source` parameter instead.
  636. *Impact* +
  637. Discontinue use of the `code` parameter. Requests that include the parameter
  638. will return an error.
  639. ====
  640. [[_type-search-matches-no-docs]]
  641. .Searches on the `_type` field are no longer supported.
  642. [%collapsible]
  643. ====
  644. *Details* +
  645. In 8.x, the `_type` metadata field has been removed. {es} now handles a search
  646. on the `_type` field as a search on a non-existent field. A search on a
  647. non-existent field matches no documents, regardless of the query string.
  648. In 7.x, a search for `_doc` in the `_type` field would match the same documents
  649. as a `match_all` query.
  650. *Impact* +
  651. Remove queries on the `_type` field from your search requests and search
  652. templates. Searches that include these queries may return no results.
  653. ====
  654. [[msearch-empty-line-support]]
  655. .The multi search API now parses an empty first line as action metadata in text files.
  656. [%collapsible]
  657. ====
  658. *Details* +
  659. The multi search API now parses an empty first line as empty action metadata
  660. when you provide a text file as the request body, such as when using curl's
  661. `--data-binary` flag.
  662. The API no longer supports text files that contain:
  663. * An empty first line followed by a line containing only `{}`.
  664. * An empty first line followed by another empty line.
  665. *Impact* +
  666. Don't provide an unsupported text file to the multi search API. Requests that
  667. include an unsupported file will return an error.
  668. ====
  669. [[remove-unmapped-type-string]]
  670. .The `unmapped_type: string` sort option has been removed.
  671. [%collapsible]
  672. ====
  673. *Details* +
  674. Search requests no longer support the `unmapped_type: string` sort option.
  675. Instead, use `unmapped_type: keyword` to handle an unmapped field as if it had
  676. the `keyword` field type but ignore its values for sorting.
  677. *Impact* +
  678. Discontinue use of `unmapped_type: string`. Search requests that include the
  679. `unmapped_type: string` sort option will return shard failures.
  680. ====
  681. [[id-field-data]]
  682. .Aggregating and sorting on `_id` is disallowed by default.
  683. [%collapsible]
  684. ====
  685. *Details* +
  686. Previously, it was possible to aggregate and sort on the built-in `_id` field
  687. by loading an expensive data structure called fielddata. This was deprecated
  688. in 7.6 and is now disallowed by default in 8.0.
  689. *Impact* +
  690. Aggregating and sorting on `_id` should be avoided. As an alternative, the
  691. `_id` field's contents can be duplicated into another field with docvalues
  692. enabled (note that this does not apply to auto-generated IDs).
  693. ====
  694. .The `common` query has been removed.
  695. [%collapsible]
  696. ====
  697. *Details* +
  698. The `common` query, deprecated in 7.x, has been removed in 8.0.
  699. The same functionality can be achieved by the `match` query if the total number of hits is not tracked.
  700. *Impact* +
  701. Discontinue use of the `common` query. Search requests containing a `common`
  702. query will return an error.
  703. ====
  704. .The `cutoff_frequency` parameter has been removed from the `match` and `multi_match` query.
  705. [%collapsible]
  706. ====
  707. *Details* +
  708. The `cutoff_frequency` parameter, deprecated in 7.x, has been removed in 8.0 from `match` and `multi_match` queries.
  709. The same functionality can be achieved without any configuration provided that the total number of hits is not tracked.
  710. *Impact* +
  711. Discontinue use of the `cutoff_frequency` parameter. Search requests containing
  712. this parameter in a `match` or `multi_match` query will return an error.
  713. ====
  714. .The `nested_filter` and `nested_path` properties have been removed from the search API's `sort` request body parameter.
  715. [%collapsible]
  716. ====
  717. *Details* +
  718. The `nested_filter` and `nested_path` options, deprecated in 6.x, have been removed in favor of the `nested` context.
  719. *Impact* +
  720. Discontinue use of the `sort` request body parameter's `nested_filter` and
  721. `nested_path` properties. Requests containing these properties will return an
  722. error.
  723. ====
  724. .Search and get requests are now routed to shards using adaptive replica selection by default.
  725. [%collapsible]
  726. ====
  727. *Details* +
  728. {es} will no longer prefer using shards in the same location (with the same awareness attribute values) to process
  729. `_search` and `_get` requests. Adaptive replica selection (activated by default in this version) will route requests
  730. more efficiently using the service time of prior inter-node communications.
  731. *Impact* +
  732. No action needed.
  733. ====
  734. .Vector functions using `(query, doc['field'])` are no longer supported.
  735. [%collapsible]
  736. ====
  737. *Details* +
  738. The vector functions of the form `function(query, doc['field'])` were
  739. deprecated in 7.6, and are now removed in 8.x. The form
  740. `function(query, 'field')` should be used instead. For example,
  741. `cosineSimilarity(query, doc['field'])` is replaced by
  742. `cosineSimilarity(query, 'field')`.
  743. *Impact* +
  744. Use the `function(query, 'field')` form. Discontinue use of the `function(query,
  745. doc['field'])` form. Requests containing the `function(query,
  746. doc['field'])` form will return an error.
  747. ====
  748. .The search API's `indices_boost` request body parameter no longer accepts object values.
  749. [%collapsible]
  750. ====
  751. *Details* +
  752. The `indices_boost` option in the search request used to accept the boosts
  753. both as an object and as an array. The object format has been deprecated since
  754. 5.2 and is now removed in 8.0.
  755. *Impact* +
  756. Use only array values in the `indices_boost` parameter. Requests containing an
  757. object value in the `indices_boost` parameter will return an error.
  758. ====
  759. .The search API's `use_field_mapping` request body parameter has been removed.
  760. [%collapsible]
  761. ====
  762. *Details* +
  763. In 7.0, we began formatting `docvalue_fields` by default using each field's
  764. mapping definition. To ease the transition from 6.x, we added the format
  765. option `use_field_mapping`. This parameter was deprecated in 7.0, and is now
  766. removed in 8.0.
  767. *Impact* +
  768. Discontinue use of the `use_field_mapping` request body parameter. Requests
  769. containing this parameter will return an error.
  770. *Compatibility* +
  771. When {ref}/rest-api-compatibility.html[rest-api-compatibility] is
  772. {ref}/rest-api-compatibility.html[requested], the `use_field_mapping` parameter
  773. is ignored.
  774. ====
  775. .The search API's `from` request body and url parameter cannot be negative.
  776. [%collapsible]
  777. ====
  778. *Details* +
  779. Search request used to accept `-1` as a `from` in the search body and the url,
  780. treating it as the default value of 0. Other negative values got rejected with
  781. an error already. We now also reject `-1` as an invalid value.
  782. *Impact* +
  783. Change any use of `-1` as `from` parameter in request body or url parameters by either
  784. setting it to `0` or omitting it entirely. Requests containing negative values will
  785. return an error.
  786. ====
  787. .Range queries on date fields treat numeric values alwas as milliseconds-since-epoch.
  788. [%collapsible]
  789. ====
  790. *Details* +
  791. Range queries on date fields used to misinterpret small numbers (e.g. four digits like 1000)
  792. as a year when no additional format was set, but would interpret other numeric values as
  793. milliseconds since epoch. We now treat all numeric values in absence of a specific `format`
  794. parameter as milliseconds since epoch. If you want to query for years instead, with a missing
  795. `format` you now need to quote the input value (e.g. "1984").
  796. *Impact* +
  797. If you query date fields without a specified `format`, check if the values in your queries are
  798. actually meant to be milliseconds-since-epoch and use a numeric value in this case. If not, use
  799. a string value which gets parsed by either the date format set on the field in the mappings or
  800. by `strict_date_optional_time` by default.
  801. ====
  802. .The `geo_bounding_box` query's `type` parameter has been removed.
  803. [%collapsible]
  804. ====
  805. *Details* +
  806. The `geo_bounding_box` query's `type` parameter was deprecated in 7.14.0 and has
  807. been removed in 8.0.0. This parameter is a no-op and has no effect on the query.
  808. *Impact* +
  809. Discontinue use of the `type` parameter. `geo_bounding_box` queries that include
  810. this parameter will return an error.
  811. ====
  812. .The `type` query has been removed.
  813. [%collapsible]
  814. ====
  815. *Details* +
  816. The `type` query has been removed. Mapping types have been removed in 8.0.
  817. *Impact* +
  818. Discontinue use of the `type` query. Requests that include the `type` query
  819. will return an error.
  820. ====
  821. .The `kibana_user` role has been renamed `kibana_admin`.
  822. [%collapsible]
  823. ====
  824. *Details* +
  825. Users who were previously assigned the `kibana_user` role should instead be assigned
  826. the `kibana_admin` role. This role grants the same set of privileges as `kibana_user`, but has been
  827. renamed to better reflect its intended use.
  828. *Impact* +
  829. Assign users with the `kibana_user` role to the `kibana_admin` role.
  830. Discontinue use of the `kibana_user` role.
  831. ====
  832. [[snapshot-resolve-system-indices]]
  833. .For snapshot and {slm-init} APIs, the `indices` parameter no longer resolves to system indices or system data streams.
  834. [%collapsible]
  835. ====
  836. *Details* +
  837. For snapshot and {slm-init} APIs, the `indices` parameter no longer resolves to
  838. system indices or system data streams.
  839. {ref}/snapshot-restore.html#feature-state[Feature states] are now the only way
  840. to back up and restore system indices or system data streams from a snapshot.
  841. You can no longer use the `indices` parameter for the
  842. {ref}/slm-api-put-policy.html[create {slm-init} policy API] or the
  843. {ref}/create-snapshot-api.html[create snapshot API] to include a system index in
  844. a snapshot. To back up a system index, use the `include_global_state` and
  845. `feature_states` parameters to include the corresponding feature state instead.
  846. By default, the `include_global_state` and `feature_states` parameters include
  847. all system indices.
  848. Similarly, you can no longer use the {ref}/restore-snapshot-api.html[restore snapshot
  849. API]'s `indices` parameter to restore a system index from a snapshot. To restore
  850. a system index, use the `include_global_state` and `feature_states` parameters
  851. to restore the corresponding feature state instead. By default, the
  852. `include_global_state` and `feature_states` parameters don't restore any system
  853. indices.
  854. *Impact* +
  855. If you previously used the `indices` parameter to back up or restore system
  856. indices, update your {slm-init} policies and application to use the
  857. `include_global_state` and `feature_states` parameters instead.
  858. An {slm-init} policy that explicitly specifies a system index in the `indices`
  859. parameter will fail to create snapshots. Similarly, a create snapshot API or
  860. restore snapshot API request that explicitly specifies a system index in the
  861. `indices` parameter will fail and return an error. If the `indices` value
  862. includes a wildcard (`*`) pattern, the pattern will no longer match system
  863. indices.
  864. ====
  865. .Snapshots compress metadata files by default.
  866. [%collapsible]
  867. ====
  868. *Details* +
  869. Previously, the default value for `compress` was `false`. The default has been changed to `true`.
  870. This change will affect both newly created repositories and existing repositories where `compress=false` has not been
  871. explicitly specified.
  872. *Impact* +
  873. Update your workflow and applications to assume a default value of `true` for
  874. the `compress` parameter.
  875. ====
  876. .S3 snapshot repositories now use a DNS-style access pattern by default.
  877. [%collapsible]
  878. ====
  879. *Details* +
  880. Starting in version 7.4, `s3` snapshot repositories no longer use the
  881. now-deprecated path-style access pattern by default. In versions 7.0, 7.1, 7.2
  882. and 7.3 `s3` snapshot repositories always used the path-style access pattern.
  883. This is a breaking change for deployments that only support path-style access
  884. but which are recognized as supporting DNS-style access by the AWS SDK. This
  885. breaking change was made necessary by
  886. https://aws.amazon.com/blogs/aws/amazon-s3-path-deprecation-plan-the-rest-of-the-story/[AWS's
  887. announcement] that the path-style access pattern is deprecated and will be
  888. unsupported on buckets created after September 30th 2020.
  889. *Impact* +
  890. If your deployment only supports path-style access and is affected by this
  891. change then you must configure the S3 client setting `path_style_access` to
  892. `true`.
  893. ====
  894. .Restore requests no longer accept settings.
  895. [%collapsible]
  896. ====
  897. *Details* +
  898. In earlier versions, you could pass both `settings` and `index_settings` in the
  899. body of a restore snapshot request, but the `settings` value was ignored. The
  900. restore snapshot API now rejects requests that include a `settings` value.
  901. *Impact* +
  902. Discontinue use of the `settings` parameter in restore
  903. snapshot request. Requests that include these parameters will return an error.
  904. ====
  905. .The repository stats API has been removed.
  906. [%collapsible]
  907. ====
  908. *Details* +
  909. The repository stats API has been removed. We deprecated this experimental API
  910. in 7.10.0.
  911. *Impact* +
  912. Use the {ref}/repositories-metering-apis.html[repositories metering APIs]
  913. instead.
  914. ====
  915. .Watcher history now writes to a hidden data stream.
  916. [%collapsible]
  917. ====
  918. *Details* +
  919. In 8.x, {es} writes Watcher history to a hidden
  920. `.watcher-history-<index-template-version>` data stream. Previously, {es} wrote
  921. Watcher history to hidden
  922. `.watcher-history-<index-template-version>-<yyyy-MM-dd>` indices.
  923. *Impact* +
  924. Update your requests to target the Watcher history data stream. For example, use
  925. the `.watcher-history-*` wildcard expression. Requests that specifically target
  926. non-existent Watcher history indices may return an error.
  927. ====
  928. .HTTP Status code has changed for the Cluster Health API in case of a server timeout.
  929. [%collapsible]
  930. ====
  931. *Details* +
  932. The {ref}/cluster-health.html[cluster health API] includes options for waiting
  933. for certain health conditions to be satisfied. If the requested conditions are
  934. not satisfied within a timeout then {es} will send back a normal response
  935. including the field `"timed_out": true`. In earlier versions it would also use
  936. the HTTP response code `408 Request timeout` if the request timed out, and `200
  937. OK` otherwise. The `408 Request timeout` response code is not appropriate for
  938. this situation, so from version 8.0.0 {es} will use the response code `200 OK`
  939. for both cases.
  940. *Impact* +
  941. To detect a server timeout, check the `timed_out` field of the JSON response.
  942. ====
  943. .The `Content-Type` response header no longer specifies the charset.
  944. [%collapsible]
  945. ====
  946. *Details* +
  947. The `Content-Type` response header no longer specifies the charset. This information is not required when transferring JSON data, because JSON text will always be encoded in Unicode, with UTF-8 being the default encoding.
  948. *Impact* +
  949. Some applications and utilities, such as PowerShell's https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod[Invoke-RestMethod], must receive charset information to display data correctly. If your application or utility relies on charset information in the `Content-Type` response header, UTF-8 encoded characters will be rendered incorrectly in the response body.
  950. As a workaround, to render non-ASCII characters, include an HTTP `Accept` header in your requests, specifying the charset:
  951. [source,sh]
  952. ----
  953. Accept: application/json; charset=utf-8
  954. ----
  955. ====