用python的es包写DSL的时候,报
elasticsearch.exceptions.RequestError: <exception str() failed>
是因为DSL的版本和ES的版本不对应。‘
我出现这个问题是因为使用6.X版本的包查询1.X版本的es
https://stackoverflow.com/questions/47235394/python-elasticsearch-exceptions-requesterror
解决方法
pip uninstall elasticsearch-dsl
pip install "elasticsearch-dsl<2.0.0"