All Projects → ongr-io → Elasticsearchbundle

ongr-io / Elasticsearchbundle

Licence: mit
Symfony bundle for Elasticsearch with steroids

Projects that are alternatives of or similar to Elasticsearchbundle

Syliuselasticsearchplugin
Elasticsearch integration for Sylius apps.
Stars: ✭ 88 (-70.27%)
Mutual labels:  elasticsearch, symfony, symfony-bundle
Foselasticabundle
Elasticsearch PHP integration for your Symfony project using Elastica.
Stars: ✭ 1,142 (+285.81%)
Mutual labels:  elasticsearch, symfony, symfony-bundle
Php Docker Boilerplate
🍲 PHP Docker Boilerplate for Symfony, Wordpress, Joomla or any other PHP Project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Stars: ✭ 503 (+69.93%)
Mutual labels:  elasticsearch, symfony
Search
PHP search-systems made possible
Stars: ✭ 101 (-65.88%)
Mutual labels:  elasticsearch, symfony
Inshop Crm Api
Inshop CRM / ERP API. It's powerful framework allows to build systems for business with different workflows. It has on board multi language support, clients management, projects & tasks, documents, simple accounting, inventory management, orders & invoice management, possibilities to integrate with third party software, REST API, and many other features.
Stars: ✭ 178 (-39.86%)
Mutual labels:  elasticsearch, symfony
Open Loyalty
Open Loyalty is technology for loyalty solutions for starting new loyalty projects.
Stars: ✭ 476 (+60.81%)
Mutual labels:  elasticsearch, symfony
Fosrestbundle
This Bundle provides various tools to rapidly develop RESTful API's with Symfony
Stars: ✭ 2,683 (+806.42%)
Mutual labels:  symfony, symfony-bundle
Adventurelookup
Adventure Lookup Main Repository
Stars: ✭ 164 (-44.59%)
Mutual labels:  elasticsearch, symfony
Enqueue Bundle
[READ-ONLY] Message queue bundle for Symfony. RabbitMQ, Amazon SQS, Redis, Service bus, Async events, RPC over MQ and a lot more
Stars: ✭ 233 (-21.28%)
Mutual labels:  symfony, symfony-bundle
Dunglasactionbundle
Symfony controllers, redesigned
Stars: ✭ 269 (-9.12%)
Mutual labels:  symfony, symfony-bundle
Framework Bundle
The FrameworkBundle defines the main framework configuration, from sessions and translations to forms, validation, routing and more.
Stars: ✭ 3,056 (+932.43%)
Mutual labels:  symfony, symfony-bundle
Liipthemebundle
Provides theming support for Symfony bundles
Stars: ✭ 292 (-1.35%)
Mutual labels:  symfony, symfony-bundle
Lexikmaintenancebundle
This Symfony2 bundle allows you to place your website in maintenance mode by calling two commands in your console. A page with status code 503 appears to users, it is possible to authorize certain ips addresses stored in your configuration.
Stars: ✭ 253 (-14.53%)
Mutual labels:  symfony, symfony-bundle
Csaguzzlebundle
A bundle integrating Guzzle >=4.0 in Symfony
Stars: ✭ 248 (-16.22%)
Mutual labels:  symfony, symfony-bundle
Sensioframeworkextrabundle
An extension to Symfony FrameworkBundle that adds annotation configuration for Controller classes
Stars: ✭ 3,203 (+982.09%)
Mutual labels:  symfony, symfony-bundle
Elastically
🔍 JoliCode's Elastica wrapper to bootstrap Elasticsearch PHP integrations
Stars: ✭ 153 (-48.31%)
Mutual labels:  elasticsearch, symfony
Fmelfinderbundle
📁 ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
Stars: ✭ 231 (-21.96%)
Mutual labels:  symfony, symfony-bundle
Easyadminextensionbundle
Provides some additional features to EasyAdminBundle for Symfony
Stars: ✭ 232 (-21.62%)
Mutual labels:  symfony, symfony-bundle
Doctrinecachebundle
Symfony2 Bundle for Doctrine Cache
Stars: ✭ 2,813 (+850.34%)
Mutual labels:  symfony, symfony-bundle
Prestasitemapbundle
A symfony bundle that provides tools to build a rich application sitemap. The main goals are : simple, no databases, various namespace (eg. google image), respect constraints etc.
Stars: ✭ 272 (-8.11%)
Mutual labels:  symfony, symfony-bundle

ONGR Elasticsearch Bundle

Build Status Latest Stable Version codecov Total Downloads Scrutinizer Code Quality

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

  • Uses the official elasticsearch-php client.
  • Ensures full integration with Symfony framework and Symfony Flex.

Technical goodies:

  • Provides a DSL query builder which represent all ElasticSearch endpoints in the objective way.
  • Provides interactive Document object generator via CLI command (ongr🇪🇸document:generate)
  • Creates a familiar Doctrine-like way to work with documents(entities) document-object mapping using annotations.
  • Several query results iterators are provided for your convenience to work with results.
  • Console CLI commands for the index management and data import/export/reindex.
  • Profiler that integrates in the Symfony debug bar and shows all executed queries.
  • Designed in an extensible way for all your custom needs.
  • Supports Symfony FLEX.

If you need any help, stack overflow is the preferred way to get answers. is the preferred and recommended way to ask questions about ONGR bundles and libraries.

If you like this library, help me to develop it by buying a cup of coffee

Buy Me A Coffee

Version matrix

Elasticsearch version ElasticsearchBundle version
>= 7.0 ~7.x
>= 6.0, < 7.0 ~6.x
>= 5.0, < 5.0 ~5.x, ~6.x (indexes with 1 type)
>= 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 some inaccuracy, please submit a PR or at least an issue to fix it!

For contribution to the documentation you can find it in the contribute topic.

FAQ

Setup the bundle

Step 1: Install Elasticsearch bundle

Elasticsearch bundle is installed using Composer.

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

Instructions for installing and deploying Elasticsearch can be found in Elasticsearch installation page.

Enable ElasticSearch bundle in your AppKernel:

<?php
// config/bundles.php

return [
    // ...
    ONGR\ElasticsearchBundle\ONGRElasticsearchBundle::class => ['all' => true],
];

(OPTIONAL) Step 2: Add configuration

Add minimal configuration for Elasticsearch bundle.

# config/packages/ongr_elasticsearch.yaml
ongr_elasticsearch:
    analysis:
        filter:
            edge_ngram_filter: #-> your custom filter name to use in the analyzer below
                type: edge_ngram 
                min_gram: 1
                max_gram: 20
        analyzer:
            eNgramAnalyzer: #-> analyzer name to use in the document field
                type: custom
                tokenizer: standard
                filter:
                    - lowercase
                    - edge_ngram_filter #that's the filter defined earlier
    indexes:
        App\Document\Product:
            hosts: [elasticsearch:9200] # optional, the default is 127.0.0.1:9200

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

Step 3: Define your Elasticsearch types as Document objects

This bundle uses objects to represent Elasticsearch documents. Lets create the Product class for the products index.

// src/Document/Product.php

namespace App\Document;

use ONGR\ElasticsearchBundle\Annotation as ES;

/**
 * //alias and default parameters in the annotation are optional. 
 * @ES\Index(alias="products", default=true)
 */
class Product
{
    /**
     * @ES\Id()
     */
    public $id;

    /**
     * @ES\Property(type="text", analyzer="eNgramAnalyzer")
     */
    public $title;

    /**
     * @ES\Property(type="float")
     */
    public $price;
}

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

Step 4: Create index and mappings

Elasticsearch bundle provides several CLI commands. One of them is for creating an index, run the command in your terminal:

bin/console ongr🇪🇸index:create

Now the products index should be created with fields from your document.

More info about the rest of the commands can be found in the commands chapter.

Step 5: Enjoy with the Elasticsearch

Full documentation for the Elasticsearch bundle is available here. I hope you will create amazing things with it 😎 .

Please note that the updating process of the documentation of the bundle to 6.0 is still under way. Read the configuration and crud sections that are already updated and will allow you to have the basic functions of the bundle. We will update the rest of the documentation as soon as possible

Troubleshooting

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].