

If you are using Elasticsearch 6.6 to 6.7, use Elasticsearch-PHP 6.7.x branch.If you are using Elasticsearch 7.x you can use Elasticsearch-PHP 7.x branch.Note: X-Pack endpoints are included from elasticsearch-php 7.7+. Option to use asynchronous future, which enables parallel execution of curl requests to multiple nodes.Generalized, pluggable architecture - most components can be replaced with your own custom class if specialized behavior is required.Pluggable connection pools to offer different connection strategies.Load balancing (with pluggable selection strategy) across all available nodes.Persistent, Keep-Alive connections (within the lifetime of the script).Configurable, automatic discovery of cluster nodes.One-to-one mapping with REST API and other language clients.Unit Testing using Mock a Elastic Client.Starting from version 7.7.0 we included also the XPack endpoints of Elasticsearch. This script reads the Elasticsearch API specs and generates the PHP classes for all the endpoints. Starting from version 7.4.0, all the endpoints (and namespaces) are autogenerated using the util/GenerateEndpoints.php script.


All parameters, from the URI to the document body, are defined in the associative array. To maintain consistency across all the low-level clients (Ruby, Python, etc.), clients accept simple associative arrays as parameters. Its goal is to provide common ground for all Elasticsearch-related code in PHP because of this it tries to be opinion-free and very extendable. Official low-level client for Elasticsearch.
