Skip to content

Commit cb57214

Browse files
committed
fix
1 parent 0d2c9f4 commit cb57214

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,8 @@ The package is developed and tested under Elasticsearch ``v6.*``. It should be a
273273
```php
274274
User::es()->whereNull('name')->get()
275275
```
276-
2. Find all users with no address
276+
2. Find all users who don't have address
277277
```php
278-
// Find the user whose name starts with 'Leo'
279278
User::es()->whereNull('Addresses')->get()
280279
```
281280
@@ -294,9 +293,8 @@ The package is developed and tested under Elasticsearch ``v6.*``. It should be a
294293
```php
295294
User::es()->whereNotNull('name')->get()
296295
```
297-
2. Find all users with at least one address
296+
2. Find all users who have at least one address
298297
```php
299-
// Find the user whose name starts with 'Leo'
300298
User::es()->whereNotNull('Addresses')->get()
301299
```
302300

src/LaravelElasticsearchQueryBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,9 @@ public function scroll($scroll_alive = '5m', $scroll_size = 500, $json = false)
753753
$this->scroll_size = $scroll_size;
754754
$scroll_id = $this->get()->rawResults()['_scroll_id'];
755755
$results = $this->get()->toArray();
756+
if($json) {
757+
$results = [json_encode($results)];
758+
}
756759
while(true) {
757760
$response = $this->es_client->scroll([
758761
'scroll_id' => $scroll_id,

0 commit comments

Comments
 (0)