Skip to content

Commit aa1dfd8

Browse files
authored
Merge pull request #114 from ensi-platform/v8-ecs-2250
ECS-2250 Add $params to indicesDelete
2 parents 025daa3 + eaadafc commit aa1dfd8

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
@@ -90,9 +90,9 @@ public function indicesInfo(array $columns = ['i'], array $sort = [], ?string $h
9090
);
9191
}
9292

93-
public function indicesDelete(string $index): array|Promise
93+
public function indicesDelete(string $index, array $params = []): array|Promise
9494
{
95-
return $this->resolveClient()->indicesDelete($index);
95+
return $this->resolveClient()->indicesDelete($index, $params);
9696
}
9797

9898
public function indicesRefresh(): array|Promise

src/ElasticClient.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ public function indicesInfo(
153153
);
154154
}
155155

156-
public function indicesDelete(string $indexName): array|Promise
156+
public function indicesDelete(string $indexName, array $params = []): array|Promise
157157
{
158158
return Response::array(
159-
$this->client->indices()->delete(['index' => $indexName])
159+
$this->client->indices()->delete(array_merge($params, ['index' => $indexName]))
160160
);
161161
}
162162

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|Promise documentDelete(string $index, int|string $id)
2121
* @method static array|Promise catIndices(string $indexName, array|null $getFields = null)
2222
* @method static array|Promise indicesInfo(array|null $indices = [], array $columns = ['i'], array $sort = [], string|null $health = null)
23-
* @method static array|Promise indicesDelete(string $indexName)
23+
* @method static array|Promise indicesDelete(string $indexName, array $params = [])
2424
* @method static array|Promise indicesRefresh(string $indexName)
2525
* @method static array|Promise indicesReloadSearchAnalyzers(string $indexName)
2626
* @method static void enableQueryLog()

0 commit comments

Comments
 (0)