我有查詢從彈性搜索中獲取數據result = es.search(index="my_index", body={"size": 1000, "query": {"match_all": {}}})
print (result)我一次就把所有元素都帶來了但我需要不斷增加尺寸,比如 10 到 20、20 到 30
1 回答

楊魅力
TA貢獻1811條經驗 獲得超6個贊
使用from參數:
result = es.search(index="my_index",
body={
"from": 10, # <---------
"size": 10,
"query": {"match_all": {}}
})
添加回答
舉報
0/150
提交
取消