[Backport 7.x] Added timeout support in bulk and msearch helpers (#1211)

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2020-06-03 10:34:57 +02:00
committed by GitHub
parent 4121e1e7ff
commit a4093a7338
7 changed files with 367 additions and 29 deletions

View File

@ -96,6 +96,16 @@ const b = client.helpers.bulk({
})
----
|`flushInterval`
a|How much time (in milliseconds) the helper will wait before flushing the body from the last document read. +
_Default:_ `30000`
[source,js]
----
const b = client.helpers.bulk({
flushInterval: 30000
})
----
|`concurrency`
a|How many request will be executed at the same time. +
_Default:_ `5`
@ -254,7 +264,7 @@ To create a new instance of the Msearch helper, you should access it as shown in
|===
|`operations`
a|How many search operations should be sent in a single msearch request. +
_Default:_ `20`
_Default:_ `5`
[source,js]
----
const b = client.helpers.msearch({
@ -262,6 +272,16 @@ const b = client.helpers.msearch({
})
----
|`flushInterval`
a|How much time (in milliseconds) the helper will wait before flushing the operations from the last operation read. +
_Default:_ `500`
[source,js]
----
const b = client.helpers.msearch({
flushInterval: 500
})
----
|`concurrency`
a|How many request will be executed at the same time. +
_Default:_ `5`