Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Concerns/InteractsWithIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public function indicesInfo(array $columns = ['i'], array $sort = [], ?string $h
);
}

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

public function indicesRefresh(): array|Promise
Expand Down
4 changes: 2 additions & 2 deletions src/ElasticClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ public function indicesInfo(
);
}

public function indicesDelete(string $indexName): array|Promise
public function indicesDelete(string $indexName, array $params = []): array|Promise
{
return Response::array(
$this->client->indices()->delete(['index' => $indexName])
$this->client->indices()->delete(array_merge($params, ['index' => $indexName]))
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ElasticQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* @method static array|Promise documentDelete(string $index, int|string $id)
* @method static array|Promise catIndices(string $indexName, array|null $getFields = null)
* @method static array|Promise indicesInfo(array|null $indices = [], array $columns = ['i'], array $sort = [], string|null $health = null)
* @method static array|Promise indicesDelete(string $indexName)
* @method static array|Promise indicesDelete(string $indexName, array $params = [])
* @method static array|Promise indicesRefresh(string $indexName)
* @method static array|Promise indicesReloadSearchAnalyzers(string $indexName)
* @method static void enableQueryLog()
Expand Down
Loading