DELETE /logstash-task-2390-*
How to send this request through the 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.
<?php
require 'vendor/autoload.php';
use Elasticsearch\ClientBuilder;
$hosts = ['http://127.0.0.1:9200'];
$client = ClientBuilder::create()->setHosts($hosts)->build();
$params = ['index' => 'logstash-task-2390-*'];
$response = $client->indices()->delete($params);
?>
thanks!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.