elasticsearch-php
elasticsearch-php copied to clipboard
Cannot handle IPv6 in publish_address as hostname/ip:port
The Elasticsearch\ConnectionPool\SniffingConnectionPool is not able to parse IPv6 address when returning publish_address in the format hostname/ip:port.
We need to change the regular expression in SniffingConnectionPool::parseClusterState() to manage hostname, IPv4 and IPv6. A potential good one can be:
$pattern = '/(.*):([0-9]+)$/';