Helper param fix (#1284)
Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
This commit is contained in:
@ -84,7 +84,7 @@ class Helpers {
|
||||
const { method, body, index, ...querystring } = params
|
||||
|
||||
let response = null
|
||||
for (let i = 0; i < maxRetries; i++) {
|
||||
for (let i = 0; i <= maxRetries; i++) {
|
||||
response = await this[kClient].search(params, options)
|
||||
if (response.statusCode !== 429) break
|
||||
await sleep(wait)
|
||||
@ -114,9 +114,10 @@ class Helpers {
|
||||
break
|
||||
}
|
||||
|
||||
for (let i = 0; i < maxRetries; i++) {
|
||||
for (let i = 0; i <= maxRetries; i++) {
|
||||
response = await this[kClient].scroll({
|
||||
...querystring,
|
||||
scroll: querystring.scroll,
|
||||
rest_total_hits_as_int: querystring.rest_total_hits_as_int || querystring.restTotalHitsAsInt,
|
||||
body: { scroll_id }
|
||||
}, options)
|
||||
if (response.statusCode !== 429) break
|
||||
|
||||
Reference in New Issue
Block a user