@@ -33,34 +33,30 @@ like the user's session ID.
33
33
34
34
==== timeout
35
35
36
- By default, the coordinating node waits((("search options", "timeout"))) to receive a response from all shards.
36
+ By default, shards process all the data they have before returning a response to
37
+ the coordinating node, which will in turn merge these responses to build the
38
+ final response.
39
+
40
+ This means that the time it takes to run a search request is the sum of the time
41
+ it takes to process the slowest shard and the time it takes to merge responses.
37
42
If one node is having trouble, it could slow down the response to all search
38
43
requests.
39
44
40
- The `timeout` parameter tells((("timeout parameter"))) the coordinating node how long it should wait
41
- before giving up and just returning the results that it already has. It can be
42
- better to return some results than none at all.
45
+ The `timeout` parameter tells((("timeout parameter"))) shards how long they
46
+ are allowed to process data before returning a response to the coordinating
47
+ node. If there was not enough time to process all data, results for this shard
48
+ will be partial, even possibly empty.
43
49
44
- The response to a search request will indicate whether the search timed out and
45
- how many shards responded successfully :
50
+ The response to a search request will indicate whether any shards returned a
51
+ partial response with the `timed_out` property :
46
52
47
53
[source,js]
48
54
--------------------------------------------------
49
55
...
50
56
"timed_out": true, <1>
51
- "_shards": {
52
- "total": 5,
53
- "successful": 4,
54
- "failed": 1 <2>
55
- },
56
57
...
57
58
--------------------------------------------------
58
59
<1> The search request timed out.
59
- <2> One shard out of five failed to respond in time.
60
-
61
- If all copies of a shard fail for other reasons--perhaps because of a
62
- hardware failure--this will also be reflected in the `_shards` section of
63
- the response.
64
60
65
61
[[search-routing]]
66
62
==== routing
0 commit comments