django-haystack-algolia python

An backend for Django apps using on Haystack 2.x


An Algolia backend for Haystack 2.x. Use Algolia service to index and search your django models.


First, go to and create an account. Then create an index, you’ll need it later.

Install haystack-algolia from github using pip:

pip install -e git+

Then add to your

    'default': {
        'ENGINE': 'haystack_algolia.algolia_backend.AlgoliaEngine',
        'APP_ID': '<YOUR APP ID>',
        'API_KEY': '<YOUR API KEY>',
        'INDEX_NAME_PREFIX': 'production-',
        'TIMEOUT': 60 * 5

Now you can use haystack as usual. Notice so far it only provides a few features:

  • Indexing your models for first time. Each model instances get indexed in a separate Algolia’s index in order to use certain Algolia optimizations
  • Updating indexes
  • Clearing indexes
  • Removing one object from its index
  • Searching models


Haystack features:

In general:

  • tests

Notice that does not support dinamically defined (per query) sort order, so using .order_by() in a haystack SearchQuerySet won’t make any difference.

Also, filtering works in a pretty different way than in other haystack backends: if you do SearchQuerySet().models(MyModel).filter(field1=“foo”, field2=“bar”) it this backend will search for “foo bar” no matter in what fields it appears. I’ll be working in providing a more accurate filtering feature using Algolia’s filtering API.

Related Repositories



An backend for Django apps using on Haystack 2.x ...

Top Contributors



-   v0.3.1 zip tar
-   v0.3 zip tar
-   v0.2.1 zip tar
-   v0.2 zip tar