2017 © Pedro Peláez
 

symfony-bundle elasticsearch-bundle

Forked bundle of ongr/elasticsearch-bundle, Elasticsearch bundle for Symfony.

image

gwsn/elasticsearch-bundle

Forked bundle of ongr/elasticsearch-bundle, Elasticsearch bundle for Symfony.

  • Tuesday, July 24, 2018
  • by xleeuwx
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 125 Forks
  • 0 Open issues
  • 74 Versions
  • 0 % Grown

The README.md

GWSN Elasticsearch Bundle

Elasticsearch Bundle was created in order to serve the need for professional Elasticsearch integration with enterprise level Symfony applications. This bundle is:, (*1)

Technical goodies:, (*2)

  • Provides interactive Document object generator via CLI (ongr:es:document:generate)
  • Provides DSL query builder to be executed by type repository services.
  • Uses Doctrine-like documents(entities) document-object mapping using annotations.
  • Query results iterators are provided for your convenience.
  • Console CLI commands for index and types management and data import / export.
  • Profiler that integrates in the Symfony debug bar and shows all executed queries.
  • Designed in an extensible way for all your custom needs.

If you need any help, stack overflow is the preferred and recommended way to ask questions about ONGR bundles and libraries., (*3)

Build Status Coverage Status Latest Stable Version Total Downloads Scrutinizer Code Quality, (*4)

Version matrix

Elasticsearch version ElasticsearchBundle version
>= 5.0 ~5.x
>= 2.0, < 5.0 >=1.0, < 5.0
>= 1.0, < 2.0 >= 0.10, < 1.0
<= 0.90.x < 0.10

Documentation

The online documentation of the bundle can be found in http://docs.ongr.io. Docs source is stored within the repo under Resources/doc/, so if you see a typo or problem, please submit a PR to fix it!, (*5)

For contribution to the documentation you can find it in the contribute topic., (*6)

FAQ

Setup the bundle

Step 1: Install Elasticsearch bundle

Elasticsearch bundle is installed using Composer., (*7)

php composer.phar require ongr/elasticsearch-bundle "~5.0"

Instructions for installing and deploying Elasticsearch can be found in Elasticsearch installation page., (*8)

Enable Elasticsearch bundle in your AppKernel:, (*9)

// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new ONGR\ElasticsearchBundle\ONGRElasticsearchBundle(),
    ];

    // ...
}

Step 2: Add configuration

Add minimal configuration for Elasticsearch bundle., (*10)


# app/config/config.yml ongr_elasticsearch: managers: default: index: index_name: acme mappings: - AppBundle

This is the very basic example only, for more information, please take a look at the configuration chapter., (*11)

In this particular example there are 2 things you should know. The index name in the index node and the mappings. Mappings is the place where your documents are stored (more info at the mapping chapter)., (*12)

Step 3: Define your Elasticsearch types as Document objects

This bundle uses objects to represent Elasticsearch documents. Lets create a Customer class for customer document., (*13)

// src/AppBundle/Document/Customer.php

namespace AppBundle\Document;

use ONGR\ElasticsearchBundle\Annotation as ES;

/**
 * @ES\Document()
 */
class Customer
{
    /**
     * @var string
     *
     * @ES\Id()
     */
    public $id;

    /**
     * @var string
     *
     * @ES\Property(type="text")
     */
    public $name;
}

This is the basic example only, for more information about mapping, please take a look at the the mapping chapter., (*14)

Step 4: Create index and mappings

Elasticsearch bundle provides several CLI commands. One of them is for creating index, run command in your terminal:, (*15)


bin/console ongr:es:index:create

More info about the rest of the commands can be found in the commands chapter., (*16)

Step 5: Enjoy with the Elasticsearch

We advise to take a look at the mapping chapter to configure the index. Search documentation for the Elasticsearch bundle is available here. And finally it's up to you what amazing things you are going to create :sunglasses: ., (*17)

Troubleshooting

License

This bundle is licensed under the MIT license. Please, see the complete license in the bundle LICENSE file., (*18)

The Versions

05/12 2015

v0.9.4

0.9.4.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/11 2015

v0.9.3

0.9.3.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

03/06 2015

v0.9.2

0.9.2.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2015

v0.9.1

0.9.1.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

22/04 2015

v0.9.0

0.9.0.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

29/01 2015

v0.5.1

0.5.1.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

27/01 2015

v0.5.0

0.5.0.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

12/01 2015
09/01 2015
15/12 2014

v0.3.0

0.3.0.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

18/11 2014

v0.2.0

0.2.0.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires

30/10 2014

v0.1.0

0.1.0.0 http://ongr.io

elasticsearch php client bundle for Symfony 2.

  Sources   Download

MIT

The Requires

 

The Development Requires