我要从ElasticSearch中获取数据
result = es.search(index="my_index", body={"size": 1000, "query": {"match_all": {}}}) print (result)
我一枪就把所有的元素都带来了但我需要不断增加,比如说10到20码,20到30码
tjjdgumg1#
使用 from 参数:
from
result = es.search(index="my_index", body={ "from": 10, # <--------- "size": 10, "query": {"match_all": {}} })
1条答案
按热度按时间tjjdgumg1#
使用
from
参数: