lakion/sylius-elastic-search-bundle

Elastic search integration for Sylius.

Installs: 326

Dependents: 0

Suggesters: 0

Security: 0

Stars: 23

Watchers: 13

Forks: 47

Open Issues: 11

Type:sylius-bundle

This package is not auto-updated.

Last update: 2020-11-27 22:42:20 UTC


README

Elastic search for Sylius. Build status on Linux

Usage

  1. Install it:

    $ composer require lakion/sylius-elastic-search-bundle
  2. Install elastic search server:

    $ brew install elasticsearch@2.4
  3. Run elastic search server:

    $ elasticsearch
  4. Add this bundle to AppKernel.php:

    new \FOS\ElasticaBundle\FOSElasticaBundle(),
    new \Lakion\SyliusElasticSearchBundle\LakionSyliusElasticSearchBundle(),
  5. Create/Setup database:

    $ app/console do:da:cr
    $ app/console do:sch:cr
    $ app/console syl:fix:lo
  6. Populate your elastic search server with command or your custom code:

    $ app/console fos:elastic:pop
  7. Import config file in app/config/config.yml for default filter set configuration:

    imports:
       - { resource: "@LakionSyliusElasticSearchBundle/Resources/config/app/config.yml" }
  8. Import routing files in app/config/routing.yml:

    sylius_search:
        resource: "@LakionSyliusElasticSearchBundle/Resources/config/routing.yml"
  9. Configuration reference:

    lakion_sylius_elastic_search:
        filter_sets:
            mugs:
                filters:
                    product_options:
                        type: option
                        options:
                            code: mug_type
                    product_price:
                        type: price