Open rishi1804 opened 4 years ago
Hi @rishi1804 I think that if you don't need to link models to indexes, you should better use elasticsearch-dsl (the library, django-elasticsearch-dsl is based upon).
The documentation should be good enough for you to use it.
As for connecting it to your REST API, I think it's the job of the framework you use for the API. For example in Django Rest Framework you are free to use generic classes (not model classes) to implement it.
https://github.com/barseghyanartur/django-elasticsearch-dsl-drf this may be of interest.
thanks, @alexgarel actually yesterday I tried using elasticsearch_dsl to avoid making models and it's working fine anyway thank you for the help I will definitely go through the links you have provided.
I have some indexes on elasticsearch I want them to use in my API so I don't want to create any model because there already exists a mapping. I know I can get data and print it in my console using elasticsearch_dsl but I m not able to do something like this in API because there I need to serialize the data and create views for that. @safwanrahman @alexgarel please help