@@ -288,19 +288,19 @@ $ php artisan es:indices:create my_new_index
288
288
``` bash
289
289
$ php artisan es:indices:reindex my_index my_new_index
290
290
291
- # you can control bulk size. Adjust it with your server.
291
+ # Control bulk size. Adjust it with your server.
292
292
293
293
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000
294
294
295
- # you can also control query scroll value.
295
+ # Control query scroll value.
296
296
297
297
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --scroll=2m
298
298
299
- # you can skip reindexing errors such as mapper parsing exceptions.
299
+ # Skip reindexing errors such as mapper parsing exceptions.
300
300
301
301
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --skip-errors
302
302
303
- # To hide all reindexing errors and show the progres bar only.
303
+ # Hide all reindexing errors and show the progres bar only.
304
304
305
305
$ php artisan es:indices:reindex my_index my_new_index --bulk-size=2000 --hide-errors
306
306
```
@@ -436,8 +436,10 @@ $documents = ES::type("my_type")->select("title", "content")->take(10)->skip(5)-
436
436
```
437
437
##### Where clause
438
438
``` php
439
- ES::type("my_type")->where("status", "published")->get();
440
- #or
439
+ ES::type("my_type")->where("status", "published")->get();
440
+
441
+ # or
442
+
441
443
ES::type("my_type")->where("status", "=", "published")->get();
442
444
```
443
445
##### Where greater than
@@ -463,7 +465,9 @@ ES::type("my_type")->where("title", "like", "foo")->get();
463
465
##### Where field exists
464
466
``` php
465
467
ES::type("my_type")->where("hobbies", "exists", true)->get();
468
+
466
469
# or
470
+
467
471
ES::type("my_type")->whereExists("hobbies", true)->get();
468
472
```
469
473
##### Where in clause
@@ -473,13 +477,17 @@ ES::type("my_type")->whereIn("id", [100, 150])->get();
473
477
##### Where between clause
474
478
``` php
475
479
ES::type("my_type")->whereBetween("id", 100, 150)->get();
480
+
476
481
# or
482
+
477
483
ES::type("my_type")->whereBetween("id", [100, 150])->get();
478
484
```
479
485
##### Where not clause
480
486
``` php
481
487
ES::type("my_type")->whereNot("status", "published")->get();
488
+
482
489
# or
490
+
483
491
ES::type("my_type")->whereNot("status", "=", "published")->get();
484
492
```
485
493
##### Where not greater than
@@ -505,7 +513,9 @@ ES::type("my_type")->whereNot("title", "like", "foo")->get();
505
513
##### Where not field exists
506
514
``` php
507
515
ES::type("my_type")->whereNot("hobbies", "exists", true)->get();
516
+
508
517
# or
518
+
509
519
ES::type("my_type")->whereExists("hobbies", true)->get();
510
520
```
511
521
##### Where not in clause
@@ -515,16 +525,22 @@ ES::type("my_type")->whereNotIn("id", [100, 150])->get();
515
525
##### Where not between clause
516
526
``` php
517
527
ES::type("my_type")->whereNotBetween("id", 100, 150)->get();
528
+
518
529
# or
530
+
519
531
ES::type("my_type")->whereNotBetween("id", [100, 150])->get();
520
532
```
521
533
522
534
##### Search by a distance from a geo point
523
535
``` php
524
536
ES::type("my_type")->distance("location", ["lat" => -33.8688197, "lon" => 151.20929550000005], "10km")->get();
537
+
525
538
# or
539
+
526
540
ES::type("my_type")->distance("location", "-33.8688197,151.20929550000005", "10km")->get();
541
+
527
542
# or
543
+
528
544
ES::type("my_type")->distance("location", [151.20929550000005, -33.8688197], "10km")->get();
529
545
```
530
546
@@ -618,7 +634,7 @@ Package comes with a built-in caching layer based on laravel cache.
618
634
``` php
619
635
ES::type("my_type")->search("foo")->remember(10)->get();
620
636
621
- # you can specify a custom cache key
637
+ # Specify a custom cache key
622
638
623
639
ES::type("my_type")->search("foo")->remember(10, "last_documents")->get();
624
640
0 commit comments