你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
trycatchfinal
赞同来自: xiaohuang
{ "mappings": { "_doc": { "properties": { "name": { "type": "text" }, "tag": { "type": "keyword", "fields": { "num": { "type": "long" } } } } } } }
"sort": [ { "tag.num": { "order": "desc" } } ]
doom
赞同来自:
匿名用户
PUT mmm { "settings": { "number_of_replicas": 0, "number_of_shards": 1 }, "mappings": { "_doc": { "properties": { "name": { "type": "text" }, "tag":{ "type": "keyword" } } } } } PUT mmm/_doc/_bulk {"index":{"_id":1}} {"name":"jack","tag":"2"} {"index":{"_id":2}} {"name":"jack","tag":"19"} {"index":{"_id":3}} {"name":"jack","tag":"129"} GET mmm/_search { "query": { "match_all": {} }, "sort": [ { "tag": { "order": "asc" } } ] } GET mmm/_search { "query": { "match_all": {} }, "sort": { "_script": { "script": { "lang": "painless", "source": "Integer.parseInt(doc['tag'].value)" }, "type": "number", "order": "asc" } } }
要回复问题请先登录或注册
4 个回复
trycatchfinal
赞同来自: xiaohuang
doom
赞同来自:
匿名用户
赞同来自:
doom
赞同来自: