Skip to content

Commit 45cd079

Browse files
authored
Merge pull request #115 from ensi-platform/v7-ecs-2250
ECS-2250 Add $params to indicesDelete
2 parents d9248d5 + b1cf6be commit 45cd079

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Concerns/InteractsWithIndex.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ public function catIndices(string $indexName, ?array $getFields = null): array
8888
return $this->resolveClient()->catIndices($indexName, $getFields);
8989
}
9090

91-
public function indicesDelete(string $index): array
91+
public function indicesDelete(string $index, array $params = []): array
9292
{
93-
return $this->resolveClient()->indicesDelete($index);
93+
return $this->resolveClient()->indicesDelete($index, $params);
9494
}
9595

9696
public function indicesRefresh(): array

src/ElasticClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ public function catIndices(string $indexName, ?array $getFields = null): array
114114
return $this->client->cat()->indices($params);
115115
}
116116

117-
public function indicesDelete(string $indexName): array
117+
public function indicesDelete(string $indexName, array $params = []): array
118118
{
119-
return $this->client->indices()->delete(['index' => $indexName]);
119+
return $this->client->indices()->delete(array_merge($params, ['index' => $indexName]));
120120
}
121121

122122
public function indicesRefresh(string $indexName): array

src/ElasticQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
* @method static array bulk(?string $index, array $body)
2121
* @method static array documentDelete(string $index, int|string $id)
2222
* @method static array catIndices(string $indexName, array|null $getFields = null)
23-
* @method static array indicesDelete(string $indexName)
23+
* @method static array indicesDelete(string $indexName, array $params = [])
2424
* @method static array indicesRefresh(string $indexName)
2525
* @method static array indicesReloadSearchAnalyzers(string $indexName)
2626
* @method static void enableQueryLog()

0 commit comments

Comments
 (0)