/DRF-ElasticSearch

Integrate Elasticsearch DSL with Django REST framework in the shortest way possible, with least efforts possible.

Primary LanguagePython

DRF ElasticSearch

Example

Download project

git clone https://github.com/bultakov/DRF-ElasticSearch.git
cd DRF-ElasticSearch
python manage.py shell
from search.documents import ProductDocument

products = ProductDocument.search().query('match', name='mahsulot')
for product in products:
    print(f"Name: {product.name}, Type: {product.product_type}")