From b1cf6be484711fe59edc00a584a4e117ab514b6d Mon Sep 17 00:00:00 2001 From: Ms_Natali Date: Sat, 1 Nov 2025 13:16:08 +0300 Subject: [PATCH] ECS-2250 --- src/Concerns/InteractsWithIndex.php | 4 ++-- src/ElasticClient.php | 4 ++-- src/ElasticQuery.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Concerns/InteractsWithIndex.php b/src/Concerns/InteractsWithIndex.php index 379ea0d..a1e8df4 100644 --- a/src/Concerns/InteractsWithIndex.php +++ b/src/Concerns/InteractsWithIndex.php @@ -88,9 +88,9 @@ public function catIndices(string $indexName, ?array $getFields = null): array return $this->resolveClient()->catIndices($indexName, $getFields); } - public function indicesDelete(string $index): array + public function indicesDelete(string $index, array $params = []): array { - return $this->resolveClient()->indicesDelete($index); + return $this->resolveClient()->indicesDelete($index, $params); } public function indicesRefresh(): array diff --git a/src/ElasticClient.php b/src/ElasticClient.php index b2b5ec1..1d75de9 100644 --- a/src/ElasticClient.php +++ b/src/ElasticClient.php @@ -114,9 +114,9 @@ public function catIndices(string $indexName, ?array $getFields = null): array return $this->client->cat()->indices($params); } - public function indicesDelete(string $indexName): array + public function indicesDelete(string $indexName, array $params = []): array { - return $this->client->indices()->delete(['index' => $indexName]); + return $this->client->indices()->delete(array_merge($params, ['index' => $indexName])); } public function indicesRefresh(string $indexName): array diff --git a/src/ElasticQuery.php b/src/ElasticQuery.php index 85a1497..c9083a8 100644 --- a/src/ElasticQuery.php +++ b/src/ElasticQuery.php @@ -20,7 +20,7 @@ * @method static array bulk(?string $index, array $body) * @method static array documentDelete(string $index, int|string $id) * @method static array catIndices(string $indexName, array|null $getFields = null) - * @method static array indicesDelete(string $indexName) + * @method static array indicesDelete(string $indexName, array $params = []) * @method static array indicesRefresh(string $indexName) * @method static array indicesReloadSearchAnalyzers(string $indexName) * @method static void enableQueryLog()