You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ElasticSearch报TypeError: string indices must be integers问题求助

问题:ElasticSearch 执行代码时出现 TypeError: string indices must be integers 错误

我执行以下ElasticSearch代码时,遇到TypeError: string indices must be integers错误:

es.indices.create(index='person', ignore=400)

res1 = es.index(index='person',doc_type='people', body=e1)
res2 = es.index(index='person',doc_type='people', body=e2)

print("RES1 : {}".format(res1))
print("RES2 : {}".format(res2))

我已将elasticsearch版本降级至5.5.3,但仍出现相同错误,恳请技术帮助。

内容的提问来源于stack exchange,提问作者Bemz

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 10:20:39