es的查詢每次默認返回10條數據
擴大數據 在index裏添加 "max_result_window" : 10000 屬性,每次返回大小爲10000條
const testMapping = `
{
"settings":{
"number_of_shards": 1,
"number_of_replicas": 0,
"max_result_window" : 10000
},
"mappings":{
"properties":{
"user":{
"type":"keyword"
},
"message":{
"type":"text"
}
}
}
}`
或者直接用kibana在該索引上執行
curl -XPUT http://localhost:9200/test_index/_settings -d '{ "index" : { "max_result_window" : 10000}}'