Closed Sparviero-Sughero closed 10 months ago
this is my solution
try {
$es_indexes = $this->client->indices()->stats(['index']);
} catch (Exception $e) {
$e = json_decode($e->getMessage(), true);
return $e;
}
foreach ($es_indexes->asArray()['indices'] as $index => $data) {
I need to update a website php from elasticsearch-php 6.x to 8.9.1 (current).
$es_indexes should be an object with all indexes
output is
but if i use asObject or asArray
output is
System details
OS: Debian 12.1 PHP: 8.2 ES: 8.9.1
Composer info
elastic/transport v8.7.0 HTTP transport PHP library for Elastic products elasticsearch/elasticsearch v8.9.0 PHP Client for Elasticsearch guzzlehttp/guzzle 7.8.0 Guzzle is a PHP HTTP client library guzzlehttp/promises 2.0.1 Guzzle promises library guzzlehttp/psr7 2.6.1 PSR-7 message implementation that also provides common utility methods