1
0

docs.asciidoc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. [[breaking_50_document_api_changes]]
  2. === Document API changes
  3. ==== `?refresh` no longer supports truthy and falsy values
  4. The `?refresh` request parameter used to accept any value other than `false`,
  5. `0`, `off`, and `no` to mean "make the changes from this request visible for
  6. search immediately." Now it only accepts `?refresh` and `?refresh=true` to
  7. mean that. You can set it to `?refresh=false` and the request will take no
  8. refresh-related action. The same is true if you leave `refresh` off of the
  9. url entirely. If you add `?refresh=wait_for` Elasticsearch will wait for the
  10. changes to become visible before replying to the request but won't take any
  11. immediate refresh related action. See <<docs-refresh>>.
  12. ==== `created` field deprecated in the Index API
  13. The `created` field has been deprecated in the Index API. It now returns
  14. `operation`, returning `"operation": "create"` when it created a document and
  15. `"operation": "index"` when it updated the document. This is also true for
  16. `index` bulk operations.
  17. ==== `found` field deprecated in the Delete API
  18. The `found` field has been deprecated in the Delete API. It now returns
  19. `operation`, returning `"operation": "deleted"` when it deleted a document and
  20. `"operation": "noop"` when it didn't found the document. This is also true for
  21. `index` bulk operations.
  22. ==== Reindex and Update By Query
  23. Before 5.0.0 `_reindex` and `_update_by_query` only retried bulk failures so
  24. they used the following response format:
  25. [source,js]
  26. ----------------------
  27. {
  28. ...
  29. "retries": 10
  30. ...
  31. }
  32. ----------------------
  33. Where `retries` counts the number of bulk retries. Now they retry on search
  34. failures as well and use this response format:
  35. [source,js]
  36. ----------------------
  37. {
  38. ...
  39. "retries": {
  40. "bulk": 10,
  41. "search": 1
  42. }
  43. ...
  44. }
  45. ----------------------
  46. Where `bulk` counts the number of bulk retries and `search` counts the number
  47. of search retries.
  48. ==== get API
  49. As of 5.0.0 the get API will issue a refresh if the requested document has
  50. been changed since the last refresh but the change hasn't been refreshed yet. This
  51. will also make all other changes visible immediately. This can have an impact on
  52. performance if the same document is updated very frequently using a read modify update
  53. pattern since it might create many small segments. This behavior can be disabled by
  54. passing `realtime=false` to the get request.