Format the output of elasticsearch-py

前端 未结 1 355
醉酒成梦
醉酒成梦 2021-01-18 12:08

I\'m trying to use the python client for elasticsearch. Here is a minimal example:

impor         


        
相关标签:
1条回答
  • 2021-01-18 13:02

    elasticsearch.py convert json response to dictionary for python, so that it is easy to extract information.

    I.e

    {u'count': 836780, u'_shards': {u'successful': 5, u'failed': 0, u'total': 5}}
    

    is python dictionary.

    If you wan to have it in json structure then you can do,

    json.dumps()
    

    look more python

    0 讨论(0)
提交回复
热议问题