c盤清理的步驟是什么(如何清理C盤空間)
如何清理C盤空間怎么清理C盤的垃圾文件?每天上網會給電腦帶來很多臨時文件,這些垃圾文件不清理掉時間久了就會影響到電腦的運行速度。那怎
2022/12/08
(相關資料圖)
Elasticsearch使用Search After深度分頁,分頁的方式是上一頁的最后一條數據sort里面的值來確定下一頁的位置,在分頁請求的過程中,有索引數據的增刪,會實時的反映到游標上。每一頁的數據依賴于上一頁最后一條數據,所以不能跳頁請求;
使用search_after必須要設置from=0;
最后一條數據里拿到sort屬性的值傳入到search_after;
curl 第一次請求:
index/type/_search?pretty -d{ "size": 10, "query": { "match": { "age": "男" } }, "sort": [{ "_uid": { "order": "desc" } }]}
返回:
{ "took": 28, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 286, "max_score": null, "hits": [{ "_index": "user_member", "_type": "member_itu", "_id": "123465", "_score": null, "_source": { "userId": "123456", "name": "123", "updateTime": "2022-12-09 13:05" }, "sort": [ "123465" ] }] }}
curl 分頁第二次請求:
index/type/_search?pretty -d{ "size": 10, "search_after": ["123456"], "query": { "match": { "age": "男" } }, "sort": [{ "_uid": { "order": "desc" } }]}
分頁返回:
{ "took": 28, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 286, "max_score": null, "hits": [{ "_index": "user_member", "_type": "member_itu", "_id": "123457", "_score": null, "_source": { "userId": "123457", "name": "124", "updateTime": "2022-12-09 14:05" }, "sort": [ "123457" ] }] }}
標簽: 最后一條