GET twitter/_search
{
"size": 10,
"query": {
"match" : {
"title" : "elasticsearch"
}
},
"search_after": [1463538857, "654323"],
"sort": [
{"date": "asc"},
{"tie_breaker_id": "asc"}
]
如何在Node.js中编写search_after(elasticsearch)代码
答案 0 :(得分:0)
search_after
键进入正文:
queryBody.search_after = [1000];
elasticClient.search({
index: elasticsearch_setup.index,
type: elasticsearch_setup.type,
size: page,
body: queryBody
}, callback);
还请注意,在使用search_after
时,您也不需要使用from / size进行迭代。