elastic / elasticsearch-dsl-py

High level Python client for Elasticsearch
http://elasticsearch-dsl.readthedocs.org
Apache License 2.0
3.82k stars 800 forks source link

Response in json for django rest-framework #1224

Open unifiedsaad opened 5 years ago

unifiedsaad commented 5 years ago

i am trying to convert reponse from elastic search object in json jsonvar.append(hit.to_dict()) but i also want meta of response to be converted with the same object. Because in the response it is only returning result ( nor the model information, nor the index information ) it is in the separate object for Example hit.meta contains meta information and hit contain result.

honzakral commented 5 years ago

This is a very good point and should be resolved as part of https://github.com/elastic/elasticsearch-dsl-py/issues/1194#issuecomment-494168344

thank you for raising the issue!