We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95ebd30 commit 9362e8eCopy full SHA for 9362e8e
src/Classes/Bulk.php
@@ -193,7 +193,11 @@ public function action($actionType, $data = [])
193
];
194
195
if (!empty($data)) {
196
- $this->body["body"][] = $data;
+ if($actionType == "update"){
197
+ $this->body["body"][] = ["doc" => $data];
198
+ }else {
199
+ $this->body["body"][] = $data;
200
+ }
201
}
202
203
$this->operationCount++;
@@ -239,7 +243,7 @@ public function commit()
239
243
if (empty($this->body)) {
240
244
return false;
241
245
242
-
246
+
247
$result = $this->query->connection->bulk($this->body);
248
$this->operationCount = 0;
249
$this->body = [];
0 commit comments