Skip to content

Commit

Permalink
pass scroll_id in the request body not a param
Browse files Browse the repository at this point in the history
  • Loading branch information
tsullivan committed Jun 22, 2021
1 parent c5e8df0 commit 618a760
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ export class CsvGenerator {
this.logger.debug(`executing scroll request`);
const results = (
await this.clients.es.asCurrentUser.scroll({
scroll: scrollSettings.duration,
scroll_id: scrollId,
body: {
scroll: scrollSettings.duration,
scroll_id: scrollId,
},
})
).body as SearchResponse<unknown>;
return results;
Expand Down Expand Up @@ -387,7 +389,7 @@ export class CsvGenerator {
if (scrollId) {
this.logger.debug(`executing clearScroll request`);
try {
await this.clients.es.asCurrentUser.clearScroll({ scroll_id: [scrollId] });
await this.clients.es.asCurrentUser.clearScroll({ body: { scroll_id: [scrollId] } });
} catch (err) {
this.logger.error(err);
}
Expand Down

0 comments on commit 618a760

Please sign in to comment.