Need help with django-zombodb?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

143 Stars 11 Forks MIT License 98 Commits 21 Opened issues


Easy Django integration with Elasticsearch through ZomboDB Postgres Extension

Services available


Need anything else?

Contributors list



.. image:: :target: :alt: PyPI Status

.. image:: :target: :alt: Build Status

.. image:: :target: :alt: Documentation Status

.. image:: :target: :alt: Coverage Status

.. image:: :alt: GitHub

Easy Django integration with Elasticsearch through

_ Postgres Extension. Thanks to ZomboDB, your Django models are synced with Elasticsearch at transaction time! Searching is also very simple: you can make Elasticsearch queries by just calling one of the search methods on your querysets. Couldn't be easier!


The full documentation is at



  • Python: 3.5, 3.6, 3.7
  • Django: 2.0, 2.1, 2.2
  • Postgres and Elasticsearch: same as
    ZomboDB current requirements 


  1. Install ZomboDB (instructions

  2. Install django-zombodb:


pip install django-zombodb
  1. Add the
    and the
    to your model:

.. code-block:: python

from django_zombodb.indexes import ZomboDBIndex
from django_zombodb.querysets import SearchQuerySet

class Restaurant(models.Model): name = models.TextField()

objects = models.Manager.from_queryset(SearchQuerySet)()

class Meta:
    indexes = [

  1. Make the migrations:


python makemigrations
  1. Add
    as the first operation of the migration you've just created:

.. code-block:: python

import django_zombodb.operations

class Migration(migrations.Migration):

dependencies = [
    ('restaurants', '0001_initial'),

operations = [
    django_zombodb.operations.ZomboDBExtension(),  # <<< here

  1. Run the migrations (Postgres user must be SUPERUSER to create the ZomboDB extension):


python migrate
  1. Done! Now you can make Elasticsearch queries directly from your model:

.. code-block:: python

Restaurant.objects.filter(is_open=True).query_string_search("brazil* AND coffee~")

Full Example



Running Tests

You need to have Elasticsearch and Postgres instances running on default ports. Also, you need ZomboDB installed. Then just do:




Please check

_. If you found or if you think you found a vulnerability please get in touch via admin AT

Please avoid disclosing any security issue on GitHub or any other public website. We'll work to swiftly address any possible vulnerability and give credit to reporters (if wanted).

Commercial Support

This project is maintained by

Vinta Software 
_ and other contributors. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: [email protected]

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.