Skip to content

Commit f8a87b0

Browse files
jpountzpolyfractal
authored andcommitted
Fix description of the timeout parameter. (#574)
Closes #536
1 parent 1d14d2b commit f8a87b0

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

060_Distributed_Search/15_Search_options.asciidoc

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,34 +33,30 @@ like the user's session ID.
3333

3434
==== timeout
3535

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.
3742
If one node is having trouble, it could slow down the response to all search
3843
requests.
3944

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.
4349

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:
4652

4753
[source,js]
4854
--------------------------------------------------
4955
...
5056
"timed_out": true, <1>
51-
"_shards": {
52-
"total": 5,
53-
"successful": 4,
54-
"failed": 1 <2>
55-
},
5657
...
5758
--------------------------------------------------
5859
<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.
6460

6561
[[search-routing]]
6662
==== routing

0 commit comments

Comments
 (0)