Download the PHP package ulff/elasticsearch-php-client-bundle without Composer
On this page you can find all versions of the php package ulff/elasticsearch-php-client-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ulff/elasticsearch-php-client-bundle
More information about ulff/elasticsearch-php-client-bundle
Files in ulff/elasticsearch-php-client-bundle
Package elasticsearch-php-client-bundle
Short Description A very simple bundle for integrating Symfony2.x/3.x with Elasticsearch-PHP 5.0
License MIT
Informations about the package elasticsearch-php-client-bundle
ElasticsearchPhpClientBundle
Setting up bundle
Version Matrix
You need to match your version of Elasticsearch to the appropriate version of this library.
Bundle Version | Elasticsearch Version |
---|---|
2.0 | 5.0 |
1.0 | >= 1.0, ⇐ 5.0 |
Step 1: Install bundle
Install bundle using composer:
Enable the bundle in AppKernel.php:
Step 2: add bundle configuration
Add following configuration to config.yml:
Replace values with proper ones.
Usage
Client usage
Elasticsearch client is available as a service:
Create new index:
Returns IndexResponse object.
Get document:
Returns GetResponse object.
Delete document:
Returns DeleteResponse object.
Delete by query:
Returns DeleteByQueryResponse object.
Make search query:
Update document:
Returns UpdateResponse object.
Purger usage
Bundle offers a possibility to purge whole index (by deleting and recreating empty). This can be useful e.g. for testing purposes.
There is a separate service provided with the bundle. Following example shows how to purge index:
Full documentation:
This bundle is a client for:
Follow the documentation there.
License
This bundle is licensed under the MIT license. Please, see the complete license in the bundle file.
All versions of elasticsearch-php-client-bundle with dependencies
symfony/framework-bundle Version ~2.1|~3.0|~4.0
elasticsearch/elasticsearch Version ~5.0