我正在使用python客户端在ES上进行非常简单的扫描搜索。出于某种原因,结果集将进入无限循环。有人可以帮忙吗?
# import
from elasticsearch import Elasticsearch
from elasticsearch.helpers import scan
es = Elasticsearch()
es.indices.create(index="analytics", ignore=400)
query = { "query": { "match_all": {} } }
result = scan(client=es, query=query, index="keywords", doc_type="eyelytics", scroll="1m")
# It goes into infinite loop here
for r in result:
print(r)
# print(result)