Download the PHP package headoo/elasticsearch-bundle without Composer

On this page you can find all versions of the php package headoo/elasticsearch-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elasticsearch-bundle

ElasticSearchBundle

Build Status Code Climate Latest Stable Version codecov

ElasticSearchBundle is a Symfony2/3 Bundle designed for simply use ElasticSearch 5.x with Doctrine 2.x

Installation

Via Composer

or in composer.json file

Register the bundle in app/AppKernel.php:

Configuration

Configure your connections and mappings in config.yml : And we will linked this to a PHP config. You can use what you want. I prefer this instead yml, it's more in a ElasticSearch way.

I give you an example of the elastic.php.

Example of entity

As you can see you have to create a Transformer for your Entities.

Usage

If auto_event is set, you have nothing to do for creation, update and deletion of your entities.

You can begin to call Elastic with HeadooElasticService and Ruflin. Example in a Controller.

For more information about querying Elastic, look at Ruflin elastica.io

If auto_event is not set, you can listen headoo.elasticsearch.event like this :

And in your EventListener Class

Command for populate

CAREFULL: You have to set --reset flag on command FIRST TIME you populate a type or all types.

After configuration of your entities, you maybe want make them available on ElasticSearch. You have to use php app/console headoo:elastic:populate for Symfony 2 or php bin/console headoo:elastic:populate for Symfony 3. Differents options are available :

Command for exodus

This command check if each document in ElasticSearch, is still linked with an entity in Doctrine. If not, this command will remove the orphan document from ES.

Reminder: Doctrine and ES should always be iso (with option 'auto_event', without that option, it can be a small delay).
If this command find document not linked, ask you why!

Security

If you discover a security vulnerability, please email instead of using the issue tracker. All security vulnerabilities will be promptly addressed.

Standalone Test

How to test

  1. clone repo : $ sudo git clone https://github.com/Headoo/ElasticSearchBundle.git
  2. go into directory : $ cd ElasticSearchBundle/
  3. install composer as explained here : https://getcomposer.org/download/
  4. launch composer update : $ ./composer.phar update
  5. launch test : $ ./vendor/bin/phpunit

License

This Bundle is open-sourced software licensed under the MIT license


All versions of elasticsearch-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
symfony/framework-bundle Version ~3.4
symfony/console Version ~3.4
symfony/finder Version ~3.4
symfony/validator Version ~3.4
symfony/process Version ~3.4
ruflin/elastica Version ^5.3
doctrine/doctrine-bundle Version ^1.6
doctrine/orm Version ^2.5
doctrine/doctrine-fixtures-bundle Version >=2.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package headoo/elasticsearch-bundle contains the following files

Loading the files please wait ....