Download the PHP package elastification/php-client-bundle without Composer
On this page you can find all versions of the php package elastification/php-client-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download elastification/php-client-bundle
More information about elastification/php-client-bundle
Files in elastification/php-client-bundle
Package php-client-bundle
Short Description A Elastification client bundle for Symfony2
License MIT
Homepage http://www.elastification.de
Informations about the package php-client-bundle
Elastification Php Client Bundle
Config
Here is the configuration section for using the bundle
Composer
Required in composer.json
You have choose the right package for your transport. If you do not have installed thrift you should use guzzle
For Thrift transport
Don't forget to run composer update after you finished your composer.json
AppKernel
In your app/config/AppHernel.php file you should activate the bundle by adding it to the array
$bundles[] = new Elastification\Bundle\ElastificationPhpClientBundle\ElastificationPhpClientBundle();
App Config
In your app/config.yml or environment based you can add params (full config example):
DIC
The registered DIC service id for the client is elastification_php_client
Serializers
Native Serializer Service Id: elastification_php_client.serializer.native
Jms Serializer Search Service Id: elastification_php_client.serializer.jms.search
Jms Serializer Document Service Id: elastification_php_client.serializer.jms.document
Repositories
Document Repository Serivce Id: elastification_php_client.repository.document
Search Repository Serivce Id: elastification_php_client.repository.search
Index Repository Serivce Id: elastification_php_client.repository.index
Cat Repository Serivce Id: elastification_php_client.repository.cat
Tagged request
If you want to register request services you can tag them with: elastification_php_client.request
Versions
HowTo
Examples
For all examples should create some sample data in your elasticsearch.
Example for Search Repository
Performs a simple search. This code is an example that can be performed within an action of a controller.
Example for Document Repository
Gets a single document by id. This code is an example that can be performed within an action of a controller.
Examples for Index Repository
Checks if an index exists This code is an example that can be performed within an action of a controller.
Creates an index This code is an example that can be performed within an action of a controller.`
Example for simple search query with native serializer and no preconfigured requests
This code is an example that can be performed within an action of a controller.
Example for tagging request services and using the request manager
Here is an example of a tagged request as service. The id parameter is optional. If this is not set, the request service id will be used. If the config parameter replace_version_of_tagged_requests is set to true. All registered requests will be parsed and set to the configured version.
Using a registered request and perform a request. This code is an example that can be performed within an action of a controller.
ToDo
- [x] create version for lib (0.1.0)
- [x] create version for bundle
- [] implement thrift config
- [x] create jms serializer services
- [x] create services for document repository
- [x] create services for search repository
- [x] create jms serializer service if jms serializer is available
- [x] client lib: create jms document entity
- [x] create document jms serializer service
- [] php-client enable/disable response (debug) output ?
All versions of php-client-bundle with dependencies
symfony/framework-bundle Version ~2.3|~3.0
symfony/yaml Version ~2.3|~3.0
elastification/php-client Version >=0.9,<1.0