rest-api-changes.asciidoc 39 KB

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