rest-api-changes.asciidoc 32 KB

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