yvdjee / django-drf-elasticsearch

Django REST Framework and Elasticsearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django DRF Elasticsearch

Want to learn how to build this?

Check out the post.

Want to use this project?

  1. Fork/Clone

  2. Install Elasticsearch if you haven't already and make sure it is running on port 9200.

  3. Create and activate a virtual environment:

    $ python3 -m venv venv && source venv/bin/activate
  4. Install the requirements:

    (venv)$ pip install -r requirements.txt
  5. Apply the migrations:

    (venv)$ python manage.py migrate
  6. Populate the database with some test data by running the following command:

    (venv)$ python manage.py populate_db
  7. Create and populate the Elasticsearch index and mapping:

    (venv)$ python manage.py search_index --rebuild
  8. Run the server

    (venv)$ python manage.py runserver
  9. Test Elasticsearch with the following queries:

About

Django REST Framework and Elasticsearch

License:MIT License


Languages

Language:Python 100.0%