diff --git a/src/SearchClient/SearchClient.php b/src/SearchClient/SearchClient.php index 96e9738..cdcde28 100644 --- a/src/SearchClient/SearchClient.php +++ b/src/SearchClient/SearchClient.php @@ -199,6 +199,8 @@ public function closeIndex(array $params): array public function getAllIndices(array $params): array { try { + $params = array_merge($params, ['format' => 'json']); + return $this->getArrayResponse($this->client->cat()->indices($params)); } catch (Exception $exception) { return $this->handleExceptionsWithArray($exception, 'Failed to get all indices'); @@ -307,6 +309,8 @@ public function deleteIndexAlias(array $params): array public function getAllIndexAliases(array $params): array { try { + $params = array_merge($params, ['format' => 'json']); + return $this->getArrayResponse($this->client->cat()->aliases($params)); } catch (Exception $exception) { return $this->handleExceptionsWithArray($exception, 'Failed to get all index Aliases');