diff --git a/docs/reference/docs/bulk.asciidoc b/docs/reference/docs/bulk.asciidoc index 382d644023b..6087a1ba3b3 100644 --- a/docs/reference/docs/bulk.asciidoc +++ b/docs/reference/docs/bulk.asciidoc @@ -283,3 +283,8 @@ POST _bulk === Security See <>. + +[float] +[[bulk-partial-responses]] +=== Partial responses +To ensure fast responses, the multi search API will respond with partial results if one or more shards fail. See <> for more information. \ No newline at end of file diff --git a/docs/reference/docs/data-replication.asciidoc b/docs/reference/docs/data-replication.asciidoc index 84375467726..b83858cecfd 100644 --- a/docs/reference/docs/data-replication.asciidoc +++ b/docs/reference/docs/data-replication.asciidoc @@ -102,12 +102,24 @@ is as follows: . Combine the results and respond. Note that in the case of get by ID look up, only one shard is relevant and this step can be skipped. [float] -==== Failure handling +[[shard-failures]] +==== Shard failures -When a shard fails to respond to a read request, the coordinating node will select another copy from the same replication group -and send the shard level search request to that copy instead. Repetitive failures can result in no shard copies being available. -In some cases, such as `_search`, Elasticsearch will prefer to respond fast, albeit with partial results, instead of waiting -for the issue to be resolved (partial results are indicated in the `_shards` header of the response). +When a shard fails to respond to a read request, the coordinating node sends the +request to another shard copy in the same replication group. Repeated failures +can result in no available shard copies. + +To ensure fast responses, the following APIs will +respond with partial results if one or more shards fail: + +* <> +* <> +* <> +* <> + +Responses containing partial results still provide a `200 OK` HTTP status code. +Shard failures are indicated by the `timed_out` and `_shards` fields of +the response header. [float] === A few simple implications diff --git a/docs/reference/docs/multi-get.asciidoc b/docs/reference/docs/multi-get.asciidoc index fc8cc667999..8d5dd2ad74a 100644 --- a/docs/reference/docs/multi-get.asciidoc +++ b/docs/reference/docs/multi-get.asciidoc @@ -1,7 +1,7 @@ [[docs-multi-get]] == Multi Get API -Multi Get API allows to get multiple documents based on an index, type, +The Multi get API returns multiple documents based on an index, type, (optional) and id (and possibly routing). The response includes a `docs` array with all the fetched documents in order corresponding to the original multi-get request (if there was a failure for a specific get, an object containing this @@ -212,3 +212,8 @@ document `test/_doc/1` will be fetched from the shard corresponding to routing k === Security See <>. + +[float] +[[multi-get-partial-responses]] +=== Partial responses +To ensure fast responses, the multi get API will respond with partial results if one or more shards fail. See <> for more information. \ No newline at end of file diff --git a/docs/reference/search/multi-search.asciidoc b/docs/reference/search/multi-search.asciidoc index 9e3bff3c0c0..34dc37d794c 100644 --- a/docs/reference/search/multi-search.asciidoc +++ b/docs/reference/search/multi-search.asciidoc @@ -173,3 +173,8 @@ GET _msearch/template ----------------------------------------------- // CONSOLE // TEST[continued] + +[float] +[[multi-search-partial-responses]] +=== Partial responses +To ensure fast responses, the multi search API will respond with partial results if one or more shards fail. See <> for more information. \ No newline at end of file diff --git a/docs/reference/search/search.asciidoc b/docs/reference/search/search.asciidoc index 8154f2e701b..f72eb7d6822 100644 --- a/docs/reference/search/search.asciidoc +++ b/docs/reference/search/search.asciidoc @@ -37,4 +37,9 @@ Or we can search across all available indices using `_all`: GET /_all/_search?q=tag:wow --------------------------------------------------- // CONSOLE -// TEST[setup:twitter] \ No newline at end of file +// TEST[setup:twitter] + +[float] +[[search-partial-responses]] +=== Partial responses +To ensure fast responses, the search API will respond with partial results if one or more shards fail. See <> for more information. \ No newline at end of file