Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bultakov/drf-elasticsearch
Integrate Elasticsearch DSL with Django REST framework in the shortest way possible, with least efforts possible.
https://github.com/bultakov/drf-elasticsearch
django django-elasticsearch-dsl django-rest-framework drf elasticsearch
Last synced: about 2 months ago
JSON representation
Integrate Elasticsearch DSL with Django REST framework in the shortest way possible, with least efforts possible.
- Host: GitHub
- URL: https://github.com/bultakov/drf-elasticsearch
- Owner: bultakov
- Created: 2024-03-07T10:52:24.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-07T14:01:45.000Z (10 months ago)
- Last Synced: 2024-03-08T12:10:22.448Z (10 months ago)
- Topics: django, django-elasticsearch-dsl, django-rest-framework, drf, elasticsearch
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DRF ElasticSearch
## Example
### Download project
```shell
git clone https://github.com/bultakov/DRF-ElasticSearch.git
``````shell
cd DRF-ElasticSearch
``````shell
python manage.py shell
``````python3
from search.documents import ProductDocumentproducts = ProductDocument.search().query('match', name='mahsulot')
for product in products:
print(f"Name: {product.name}, Type: {product.product_type}")
```- http://127.0.0.1:8000/search/product/mahsulot/