File tree 1 file changed +15
-16
lines changed
1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -569,33 +569,32 @@ ES::type("my_type")->search("bar")->count();
569
569
570
570
##### Scan-and-Scroll queries
571
571
572
- These queries are suitable for large amount of data.
573
- A scrolled search allows you to do an initial search and to keep pulling batches of results
574
- from Elasticsearch until there are no more results left. It’s a bit like a cursor in a traditional database
575
572
576
- ``` php
573
+
574
+ ``` php
575
+
576
+ # These queries are suitable for large amount of data.
577
+ # A scrolled search allows you to do an initial search and to keep pulling batches of results
578
+ # from Elasticsearch until there are no more results left.
579
+ # It’s a bit like a cursor in a traditional database
580
+
577
581
$documents = ES::type("my_type")->search("foo")
578
582
->scroll("2m")
579
583
->take(1000)
580
584
->get();
581
- ```
582
- Response will contain a hashed code ` scroll_id ` will be used to get the next result by running
583
585
584
- ``` php
586
+ # Response will contain a hashed code `scroll_id` will be used to get the next result by running
587
+
585
588
$documents = ES::type("my_type")->search("foo")
586
589
->scroll("2m")
587
590
->scrollID("DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAFMFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABSxZSUDhLU3ZySFJJYXFNRV9laktBMGZ3AAAAAAAAAU4WUlA4S1N2ckhSSWFxTUVfZWpLQTBmdwAAAAAAAAFPFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABTRZSUDhLU3ZySFJJYXFNRV9laktBMGZ3")
588
591
->get();
589
- ```
590
-
591
- And so on ...
592
-
593
- Note that you don't need to write the query parameters in every scroll.
594
- All you need the ` scroll_id ` and query scroll time.
595
-
596
- To clear ` scroll_id `
592
+
593
+ # And so on ...
594
+ # Note that you don't need to write the query parameters in every scroll. All you need the `scroll_id` and query scroll time.
597
595
598
- ``` php
596
+ # To clear `scroll_id`
597
+
599
598
ES::type("my_type")->scrollID("DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAFMFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABSxZSUDhLU3ZySFJJYXFNRV9laktBMGZ3AAAAAAAAAU4WUlA4S1N2ckhSSWFxTUVfZWpLQTBmdwAAAAAAAAFPFlJQOEtTdnJIUklhcU1FX2VqS0EwZncAAAAAAAABTRZSUDhLU3ZySFJJYXFNRV9laktBMGZ3")
600
599
->clear();
601
600
```
You can’t perform that action at this time.
0 commit comments