Haystack front-end

[user]@[machine]:~/Development$ pip3 install django-haystack
Collecting django-haystack
  Downloading ...
Successfully installed django-haystack-2.8.1

Django settings

Add haystack to the INSTALLED_APPS in the Django project settings file.

(search) [user]@[machine]:~/Development/search/search$ vi settings.py
# Application definition


Define a back-end setting for haystack, in our case Elasticsearch in the same django settings.py file by adding the following code to it:

    'default': {
        'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
        'URL': '',
        'INDEX_NAME': 'play',

INDEX_NAME defines the default index name that we will store our data in and query our data from.

  • Last modified: 2020/03/25 17:24