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
Set up a cron job, for example in a Python project using Django Haystack:
python manage.py rebuild_index --noinput
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
and add a link to it from the web service:
Then add the environment variable to configure the connection (on the default aldryn setup: add to
Test the connection:
docker-compose run --rm web python manage.py shell
>>> from haystack.query import 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.