<commit_before>[[breaking_50_document_api_changes]]
=== Document API changes

==== `?refresh` no longer supports truthy and falsy values
The `?refresh` request parameter used to accept any value other than `false`,
`0`, `off`, and `no` to mean "make the changes from this request visible for
search immediately." Now it only accepts `?refresh` and `?refresh=true` to
mean that. You can set it to `?refresh=false` and the request will take no
refresh-related action. The same is true if you leave `refresh` off of the
url entirely. If you add `?refresh=wait_for` Elasticsearch will wait for the
changes to become visible before replying to the request but won't take any
immediate refresh related action. See <<docs-refresh>>.

==== Reindex and Update By Query
Before 5.0.0 `_reindex` and `_update_by_query` only retried bulk failures so
they used the following response format:

[source,js]
----------------------
{
   ...
   "retries": 10
   ...
}
----------------------

Where `retries` counts the number of bulk retries. Now they retry on search
failures as well and use this response format:

[source,js]
----------------------
{
   ...
   "retries": {
     "bulk": 10,
     "search": 1
   }
   ...
}
----------------------<commit_msg>[docs] Deprecate found and created (#19633)<commit_after>[[breaking_50_document_api_changes]]
=== Document API changes

==== `?refresh` no longer supports truthy and falsy values
The `?refresh` request parameter used to accept any value other than `false`,
`0`, `off`, and `no` to mean "make the changes from this request visible for
search immediately." Now it only accepts `?refresh` and `?refresh=true` to
mean that. You can set it to `?refresh=false` and the request will take no
refresh-related action. The same is true if you leave `refresh` off of the
url entirely. If you add `?refresh=wait_for` Elasticsearch will wait for the
changes to become visible before replying to the request but won't take any
immediate refresh related action. See <<docs-refresh>>.

==== `created` field deprecated in the Index API

The `created` field has been deprecated in the Index API. It now returns
`operation`, returning `"operation": "create"` when it created a document and
`"operation": "index"` when it updated the document. This is also true for
`index` bulk operations.

==== `found` field deprecated in the Delete API

The `found` field has been deprecated in the Delete API. It now returns
`operation`, returning `"operation": "deleted"` when it deleted a document and
`"operation": "noop"` when it didn't found the document. This is also true for
`index` bulk operations.

==== Reindex and Update By Query
Before 5.0.0 `_reindex` and `_update_by_query` only retried bulk failures so
they used the following response format:

[source,js]
----------------------
{
   ...
   "retries": 10
   ...
}
----------------------

Where `retries` counts the number of bulk retries. Now they retry on search
failures as well and use this response format:

[source,js]
----------------------
{
   ...
   "retries": {
     "bulk": 10,
     "search": 1
   }
   ...
}
----------------------
{'fraction_non_alphanumeric': 0.15152487961476727, 'fraction_numerical': 0.008667736757624398, 'mean_word_length': 3.1713520749665327, 'pattern_counts': {'":': 12, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3428550', 'n_tokens_mistral': 867, 'n_tokens_neox': 843, 'n_words': 408}