Skip to content

Commit

Permalink
fix scroll function
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Nov 8, 2018
1 parent fc023f9 commit 556fb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaravelElasticsearchQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,8 @@ public function get() {
public function scroll($scroll_alive = '5m', $scroll_size = 500) {
$this->scroll_alive = $scroll_alive;
$this->scroll_size = $scroll_size;
$results = [];
$scroll_id = $this->get()->rawResults()['_scroll_id'];
$results = $this->get()->toArray();
while(true) {
$response = $this->es_client->scroll([
'scroll_id' => $scroll_id,
Expand Down

0 comments on commit 556fb02

Please sign in to comment.