(POST in BETA version, but I prefer release it, and enhance it later, than never publish ^^)
I want to use Elastic, to manage my search functionality.
It’s a symfony2 project, so I start my research by the integration of Elastic in symfony2, and FosElastica came up.
Thanks to FOS #friendOfSymfony2 people again, and again, your work is amazing !
Also nothing happends here without Elastica
This bundle provides integration with ElasticSearch and Elastica with Symfony2. Features include:
Integrates the Elastica library into a Symfony2 environment
Automatically generate mappings using a serializer
Listeners for Doctrine events for automatic indexing
I assume here, you have already a running symfony2 project, with data on it, I use this setup, to search over user, by name, mail, and over another data named « tags », a kind of internal references to group items.
- install Elastic
- configure Elastic
- install FosElastica
- configure FosElastica
- try with Elastic web interface to confirm 4 firsts sets
- add typeahead.js to your page
- configure and implement bloodhound and typeahead
- Enjoy !
1 – Install of elasticsearch :
(If you are under ubuntu use sudo if you not root, tested on ubuntu 15.10 and Debian 8.)
To have elastic working, I’ve to :
Both debian and ubuntu.
After that, you need to go to :
and open « elasticsearch.yml » to configure it.
2 – Configuration
(TODO : CORS config + security)
3 – Install FosElastica
with composer :
And enable it :
4 - FosElastica configuration :
Faster Autocomplete with typeahead.js, Elasticsearch & nginx