Skip to content

Commit baf872b

Browse files
committed
2 parents d61b717 + ea2be7c commit baf872b

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

readme.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ If you don't want to enable working with Lumen facades you can access the query
8787

8888
```php
8989
app("es")->index("my_index")->type("my_type")->get();
90+
9091
# is similar to
92+
9193
ES::index("my_index")->type("my_type")->get();
9294
```
9395

@@ -298,11 +300,11 @@ $ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --scroll
298300

299301
# Skip reindexing errors such as mapper parsing exceptions.
300302

301-
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --skip-errors
303+
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --skip-errors
302304

303305
# Hide all reindexing errors and show the progres bar only.
304306

305-
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --hide-errors
307+
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --skip-errors --hide-errors
306308
```
307309

308310
5) Remove `my_index_alias` alias from `my_index` and add it to `my_new_index` in configuration file and update with command:
@@ -567,38 +569,36 @@ ES::type("my_type")->search("bar")->count();
567569

568570
##### Scan-and-Scroll queries
569571

570-
These queries are suitable for large amount of data.
571-
A scrolled search allows you to do an initial search and to keep pulling batches of results
572-
from Elasticsearch until there are no more results left. It’s a bit like a cursor in a traditional database
573572

574-
```php
573+
574+
```php
575+
# These queries are suitable for large amount of data.
576+
# A scrolled search allows you to do an initial search and to keep pulling batches of results
577+
# from Elasticsearch until there are no more results left.
578+
# It’s a bit like a cursor in a traditional database
579+
575580
$documents = ES::type("my_type")->search("foo")
576581
->scroll("2m")
577582
->take(1000)
578583
->get();
579-
```
580-
Response will contain a hashed code `scroll_id` will be used to get the next result by running
581584

582-
```php
585+
# Response will contain a hashed code `scroll_id` will be used to get the next result by running
586+
583587
$documents = ES::type("my_type")->search("foo")
584588
->scroll("2m")
585589
->scrollID("DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAFMFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABSxZSUDhLU3ZySFJJYXFNRV9laktBMGZ3AAAAAAAAAU4WUlA4S1N2ckhSSWFxTUVfZWpLQTBmdwAAAAAAAAFPFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABTRZSUDhLU3ZySFJJYXFNRV9laktBMGZ3")
586590
->get();
587-
```
588-
589-
And so on ...
590-
591-
Note that you don't need to write the query parameters in every scroll.
592-
All you need the `scroll_id` and query scroll time.
593-
594-
To clear `scroll_id`
591+
592+
# And so on ...
593+
# Note that you don't need to write the query parameters in every scroll. All you need the `scroll_id` and query scroll time.
595594

596-
```php
595+
# To clear `scroll_id`
596+
597597
ES::type("my_type")->scrollID("DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAFMFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABSxZSUDhLU3ZySFJJYXFNRV9laktBMGZ3AAAAAAAAAU4WUlA4S1N2ckhSSWFxTUVfZWpLQTBmdwAAAAAAAAFPFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABTRZSUDhLU3ZySFJJYXFNRV9laktBMGZ3")
598598
->clear();
599599
```
600600

601-
##### Paginate results with per_page = 5
601+
##### Paginate results with 5 records per page
602602

603603
```php
604604
$documents = ES::type("my_type")->search("bar")->paginate(5);

0 commit comments

Comments
 (0)