rest-api-changes.asciidoc 39 KB

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