Added timeout support in bulk and msearch helpers (#1206)

This commit is contained in:
Tomas Della Vedova
2020-06-03 10:33:08 +02:00
committed by GitHub
parent dbbee273d9
commit 80817a00f9
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`