摘要: 一、某些场景可能需要在全部数据或者条件查询中返回随机的几条数据 比如随机返回4条数据 方式一:随机排序 DSL语句 { "query": { "match_all": {} }, "sort": [ { "_script": { "script": "Math.random()", "type": 阅读全文
posted @ 2022-06-27 16:06 木马不是马 阅读(1440) 评论(0) 推荐(0) 编辑