IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Setting the Connection Selector
editSetting the Connection Selector
editThe connection pool manages the connections to your cluster, but the Selector is the logic that decides which connection
should be used for the next API request. There are several selectors that you can choose from. Selectors can be changed
via the setSelector()
method:
$selector = '\Elasticsearch\ConnectionPool\Selectors\StickyRoundRobinSelector'; $client = ClientBuilder::create() ->setSelector($selector) ->build();
For more details, please see the dedicated page on configuring selectors.