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.

Step 1:

Install the two packages 'flowpack/elasticsearch-contentrepositoryadaptor'  and 'flowpack/searchplugin' via composer:

composer require 'flowpack/elasticsearch-contentrepositoryadaptor'
composer require 'flowpack/searchplugin'

Step 2:

Configure Elasticsearch depending on version. See the official documentation:
Flowpack.ElasticSearch.ContentRepositoryAdaptor Documentation

Step 3:

Configure the Elasticsearch packages and store the appropriate version and the appropriate data for the Elasticsearch server:

        # Version of Elasticsearch
        version: 2.x
        # Data of the Elasticsearch server
          host: elasticsearch
          port: 9200
          username: ''
          password: ''

Step 4:

With the flow command 'nodeindex: build', the contents are indexed and can be found from then on:

./flow nodeindex:build

Step 5:

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: