Divio's default version of Elasticsearch is version 2.3. Other versions can be made available on request.

How to enable Elasticsearch

In your project's Subscription, add as many Elastic search instances as you think you will need. One you have applied the new subscription, we will provision it on your cloud project.

We will apply a DEFAULT_HAYSTACK_URL variable to your environments; this takes the form:


Support for AWS Elasticsearch-style connections is also available:


Other options are also available, so if you have special requirements please contact our support.

Usage for Python projects using Django Haystack

Scheduled indexing

Set up a cron job, for example in a Python project using Django Haystack:

python manage.py rebuild_index --noinput


Set the ALDRYN_HAYSTACK_DEBUG environment variable to True  to get detailed logs from Haystack.

Local environment set-up

For local development add an ElasticSearch service to docker-compose.yml:

    image: elasticsearch:2.3

and add a link to it from the web service:

      - "es:es"

Then add the environment variable to configure the connection (on the default aldryn setup: add to .env-local):


Test the connection:

docker-compose run --rm web python manage.py shell
>>> from haystack.query import SearchQuerySet
>>> list(SearchQuerySet())

There won't be any results yet, since nothing has so far been indexed. However you will get an error if the connection does not work.

For further information

To learn more about how to setup your project, please see the Aldryn Haystack GitHub Repository.

Did this answer your question?