目前我正在使用以下程序从弹性搜索中提取 id 及其严重性信息。
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, Q
client = Elasticsearch(
[
#'http://user:secret@10.x.x.11:9200/',
'http://10.x.x.11:9200/',
],
verify_certs=True
)
s = Search(using=client, index="test")
response = s.execute()
for hit in response:
print hit.message_id, hit.severity, "\n\n"
我相信默认情况下查询返回 10 行。我在弹性搜索中有超过 10000 行。我需要获取所有信息。
有人可以指导我如何运行相同的查询来获取所有记录吗?