Install it:
$ composer require lakion/sylius-elastic-search-bundle
Install elastic search server:
$ brew install elasticsearch@2.4
Run elastic search server:
$ elasticsearch
Add this bundle to AppKernel.php
:
new \FOS\ElasticaBundle\FOSElasticaBundle(),
new \Lakion\SyliusElasticSearchBundle\LakionSyliusElasticSearchBundle(),
Create/Setup database:
$ app/console do:da:cr
$ app/console do:sch:cr
$ app/console syl:fix:lo
Populate your elastic search server with command or your custom code:
$ app/console fos:elastic:pop
Import config file in app/config/config.yml
for default filter set configuration:
imports:
- { resource: "@LakionSyliusElasticSearchBundle/Resources/config/app/config.yml" }
Import routing files in app/config/routing.yml
:
sylius_search:
resource: "@LakionSyliusElasticSearchBundle/Resources/config/routing.yml"
Configuration reference:
lakion_sylius_elastic_search:
filter_sets:
mugs:
filters:
product_options:
type: option
options:
code: mug_type
product_price:
type: price