Setting the Connection Pool

edit

Setting the Connection Pool

edit

The client maintains a pool of connections, with each connection representing a node in your cluster. There are several connection pool implementations available, and each has slightly different behavior (pinging vs no pinging, etc). Connection pools are configured via the setConnectionPool() method:

$connectionPool = '\Elasticsearch\ConnectionPool\StaticNoPingConnectionPool';
$client = ClientBuilder::create()
            ->setConnectionPool($connectionPool)
            ->build();

For more details, please see the dedicated page on configuring connection pools.