Skip to content

Commit fbd822a

Browse files
authored
Merge pull request #72 from ensi-platform/v8-ecs-931
ECS-931
2 parents d4d9d1d + bdbc7a1 commit fbd822a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ElasticClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public function indicesCreate(string $index, array $settings): ?Promise
7070
);
7171
}
7272

73-
public function bulk(string $index, array $body): array|Promise
73+
public function bulk(?string $index, array $body): array|Promise
7474
{
7575
return Response::array(
76-
$this->client->bulk(['index' => $index, 'body' => $body])
76+
$this->client->bulk(array_filter(['index' => $index, 'body' => $body]))
7777
);
7878
}
7979

src/ElasticQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @method static array|Promise get(string $indexName, int|string $id)
1616
* @method static array|Promise indicesExists(string $index)
1717
* @method static null|Promise indicesCreate(string $index, array $settings)
18-
* @method static array|Promise bulk(string $index, array $body)
18+
* @method static array|Promise bulk(?string $index, array $body)
1919
* @method static array|Promise documentDelete(string $index, int|string $id)
2020
* @method static array|Promise catIndices(string $indexName, array|null $getFields = null)
2121
* @method static array|Promise indicesInfo(array|null $indices = [], array $columns = ['i'], array $sort = [], string|null $health = null)

0 commit comments

Comments
 (0)