Django, Haystack and Elasticsearch – Part 1

I’m wrapping up a little side project at the moment (more on that very soon) which required full-text search, autocomplete, and a few other bits of search related functionality.

After some research I landed upon the combination of Elasticsearch and the awesome Django application Haystack.

First step was to get Elasticsearch up and running locally on OS X…

1) Download latest zip from A good spot is:


2) Create the following directories:


3) Add the following to your .profile (allows you to run Elasticsearch from the command prompt without the full path):

4) Update the following values in the Elasticsearch config file:

5) Ensure all requirements are installed (django-haystack, pyelasticsearch, requests, simplejson):

6) You should now be able to start Elasticsearch:

7) Add Haystack to your Django config:

8) After you’ve added your search indexes, you can use to rebuild the search index:

$ python rebuild_index

One thought on “Django, Haystack and Elasticsearch – Part 1”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s