IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Installation
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Installation
edit-
Include elasticsearch-php in your
composer.jsonfile:{ "require": { "elasticsearch/elasticsearch": "~5.0" } } -
Install the client with composer:
curl -s http://getcomposer.org/installer | php php composer.phar install --no-dev
-
Include the autoloader in your main project (if you haven’t already), and instantiate a new client :
require 'vendor/autoload.php'; use Elasticsearch\ClientBuilder; $client = ClientBuilder::create()->build();