Skip to content

Commit

Permalink
Refactor scroll query parameter construction
Browse files Browse the repository at this point in the history
There has been a change in how query parameters are constructed for the Elasticsearch scroll API. We now directly pass the scrollId under the PARAM_BODY key, fixing a bug where Elasticsearch would abort the query due to an URL too long. Fixes #320.
  • Loading branch information
Radiergummi committed Aug 24, 2023
1 parent 6b505ac commit 0830c40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Concerns/ExecutesQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,9 @@ public function performSearch(string|null $scrollId = null): array|null
->getClient()
->scroll([
Query::PARAM_SCROLL => $this->getScroll(),
Query::PARAM_SCROLL_ID => $scrollId,
Query::PARAM_BODY => [
Query::PARAM_SCROLL_ID => $scrollId
],
]);
} else {
$query = $this->buildQuery();
Expand Down

0 comments on commit 0830c40

Please sign in to comment.