提示:这里简述项目相关背景:
提示:这里描述项目中遇到的问题:
from elasticsearch import Elasticsearch
# 连接es
# es = Elasticsearch()
es = Elasticsearch(['http://10.0.0.1:9200'], http_auth=('ryan', 'axax1234'), timeout=3600)
result = es.indices.create(index='news', ignore=400)
print(result)
提示
The client noticed that the server is not Elasticsearch and we do not support this unknown product
提示:这里填写问题的分析:
es为了与aws大战,在新的版本中,不再支持apach 2.0开源协议
提示:这里填写该问题的具体解决方案:
更换es版本降到7.14以下就可以啦
pip install Elasticsearch==7.13