弹性搜索。无法建立新连接:[WinError 10061]

2024-09-27 22:31:46 发布

您现在位置:Python中文网/ 问答频道 /正文

在写了这个代码之后,我得到了一个连接错误

from elasticsearch import Elasticsearch
es = Elasticsearch()
doc = {'author': 'kimchy','text': 'Elasticsearch: cool. bonsai cool.'}
res = es.index(index="test-index", doc_type='tweet', id=1, body=doc)

问题出在代码里还是我的电脑里? 我能做些什么来修复它


Tags: 代码textfromimportindexdoces错误

热门问题