我目前正在尝试使用python包为elasticsearch运行查询。但是,每当我调用es.search()时,我只得到10个结果,当时应该超过1M。谁能告诉我如何获得所有的点击量?
答案 0 :(得分:0)
使用elasticsearch
和elasticsearch-dsl
库:
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search
client = Elasticsearch(host="localhost")
s = Search(using=client, index="my_index")
for hit in s.scan():
print(hit.title)