Dream team: Neos and Elasticsearch
July 24, 2017, 6:36 pm
Is it difficult to get a powerful search for your homepage? With Neos and Elasticsearch this is now a breeze. In 5 easy steps to your own Elasticsearch search.
Install the two packages 'flowpack/elasticsearch-contentrepositoryadaptor' and 'flowpack/searchplugin' via composer:
composer require 'flowpack/elasticsearch-contentrepositoryadaptor' composer require 'flowpack/searchplugin'
Configure Elasticsearch depending on version. See the official documentation:
Configure the Elasticsearch packages and store the appropriate version and the appropriate data for the Elasticsearch server:
Flowpack: ElasticSearch: ContentRepositoryAdaptor: driver: # Version of Elasticsearch version: 2.x clients: default: # Data of the Elasticsearch server - host: elasticsearch port: 9200 username: '' password: ''
With the flow command 'nodeindex: build', the contents are indexed and can be found from then on:
Then we just have to put the search plugin on a page:
After these 5 steps we have a fully functional search:
Nice to have:
So that the search is not only functional, but also looks pretty, I recommend to improve the search a bit with CSS.
Further Links / Documentations:
With this base you have many other possibilities to improve the search. More information can be found in the following documentations: