Skip to content

Commit ce6792b

Browse files
committed
update bulk docs
1 parent 9362e8e commit ce6792b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

readme.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,15 @@ ES::type("my_type")->id(3)->update([
852852

853853
# [id is required]
854854
```
855+
856+
```php
857+
# Bulk update
858+
859+
ES::type("my_type")->bulk(function ($bulk){
860+
$bulk->id(10)->update(["title" => "Test document 1","content" => "Sample content 1"]);
861+
$bulk->id(11)->update(["title" => "Test document 2","content" => "Sample content 2"]);
862+
});
863+
```
855864

856865
##### Incrementing field
857866
```php
@@ -913,6 +922,15 @@ ES::type("my_type")->id(3)->delete();
913922
# [id is required]
914923
```
915924

925+
```php
926+
# Bulk delete
927+
928+
ES::type("my_type")->bulk(function ($bulk){
929+
$bulk->id(10)->delete();
930+
$bulk->id(11)->delete();
931+
});
932+
```
933+
916934
## Releases
917935

918936
See [Change Log](https://github.com/basemkhirat/elasticsearch/blob/master/CHANGELOG.md).

0 commit comments

Comments
 (0)