Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisunXia committed Feb 1, 2019
1 parent 0d2c9f4 commit cb57214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ The package is developed and tested under Elasticsearch ``v6.*``. It should be a
```php
User::es()->whereNull('name')->get()
```
2. Find all users with no address
2. Find all users who don't have address
```php
// Find the user whose name starts with 'Leo'
User::es()->whereNull('Addresses')->get()
```
Expand All @@ -294,9 +293,8 @@ The package is developed and tested under Elasticsearch ``v6.*``. It should be a
```php
User::es()->whereNotNull('name')->get()
```
2. Find all users with at least one address
2. Find all users who have at least one address
```php
// Find the user whose name starts with 'Leo'
User::es()->whereNotNull('Addresses')->get()
```
Expand Down
3 changes: 3 additions & 0 deletions src/LaravelElasticsearchQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,9 @@ public function scroll($scroll_alive = '5m', $scroll_size = 500, $json = false)
$this->scroll_size = $scroll_size;
$scroll_id = $this->get()->rawResults()['_scroll_id'];
$results = $this->get()->toArray();
if($json) {
$results = [json_encode($results)];
}
while(true) {
$response = $this->es_client->scroll([
'scroll_id' => $scroll_id,
Expand Down

0 comments on commit cb57214

Please sign in to comment.