Send wildcard request through php client

DELETE /logstash-task-2390-*

How to send this request through the PHP client?

The same way you can delete any index in PHP: just use wildcards in the index name as you please.


require 'vendor/autoload.php';

use Elasticsearch\ClientBuilder;

$hosts = [''];
$client = ClientBuilder::create()->setHosts($hosts)->build();

$params = ['index' => 'logstash-task-2390-*'];
$response = $client->indices()->delete($params);



This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.