sonata-project/ecommerce — pull request #234 by eko (2014-04-11 14:02:26+00:00)
Title: [WIP] Add search engine

This is a **Work In Progress** PR to add a search engine on e-commerce.

### About

This is using a `SonataDatagridBundle` (not available yet) using the `SonataAdminBundle` Datagrid logic (a `ProxyQuery`, a `Pager`, a `Form`) outside `SonataAdminBundle`.

### Search providers

The idea is to have a `SearchBuilder` class building query from a (search) provider specified in configuration.

There is 2 providers:

* `sonata.product.search.provider.doctrine`: *(default)* Search engine will use Doctrine to perform search,
* `sonata.product.search.provider.elastica`: Search engine will use ElasticSearch (via FOSElasticaBundle) to perform search.

They can be specified in `SonataProductBundle` configuration as follows:

```yml
sonata_product:
search:
provider: sonata.product.search.provider.doctrine
```

### Todo

* [x] Add search builder logic with 2 providers (doctrine & elasticsearch)
* [ ] Manage product search filters
* [ ] Add unit tests
* [ ] Release a SonataDatagridBundle