Skip to content

Commit f43bd34

Browse files
authored
Merge pull request #71 from ensi-platform/v7-ecs-931
ECS-931
2 parents 4e199c9 + 3d78bf4 commit f43bd34

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ElasticClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ public function indicesCreate(string $index, array $settings): void
7878
]);
7979
}
8080

81-
public function bulk(string $index, array $body): array
81+
public function bulk(?string $index, array $body): array
8282
{
83-
return $this->client->bulk([
83+
return $this->client->bulk(array_filter([
8484
'index' => $index,
8585
'body' => $body,
86-
]);
86+
]));
8787
}
8888

8989
public function documentDelete(string $index, int|string $id): array

src/ElasticQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @method static array get(string $indexName, int|string $id)
1717
* @method static array indicesExists(string $index)
1818
* @method static void indicesCreate(string $index, array $settings)
19-
* @method static array bulk(string $index, array $body)
19+
* @method static array bulk(?string $index, array $body)
2020
* @method static array documentDelete(string $index, int|string $id)
2121
* @method static array catIndices(string $indexName, array|null $getFields = null)
2222
* @method static array indicesDelete(string $indexName)

0 commit comments

Comments
 (0)