你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
kennywu76 - Wood
赞同来自: rochy 、lbx6z 、laoyang360 、exceptions 、cccthought
PUT testme { "settings": {}, "mappings": { "doc": { "properties": { "id": { "type": "double" } } } } } POST testme/doc { "id": 1.01 } POST testme/_search { "docvalue_fields": [ "id" ] } { "took": 0, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 1, "max_score": 1, "hits": [ { "_index": "testme", "_type": "doc", "_id": "eKQxamUBsQ3QCcRZRbR5", "_score": 1, "_source": { "id": 1.01 }, "fields": { "id": [ 1.01 ] } } ] } }
PUT testme { "settings": {}, "mappings": { "doc": { "properties": { "id": { "type": "scaled_float", "scaling_factor": 100 } } } } } POST testme/doc { "id": 1.01 } POST testme/_search { "docvalue_fields": [ "id" ] } { "took": 0, "timed_out": false, "_shards": { "total": 5, "successful": 5, "skipped": 0, "failed": 0 }, "hits": { "total": 1, "max_score": 1, "hits": [ { "_index": "testme", "_type": "doc", "_id": "R6QwamUBsQ3QCcRZyrQK", "_score": 1, "_source": { "id": 1.01 }, "fields": { "id": [ 1.01 ] } } ] } }
zqc0512 - andy zhou
赞同来自:
wjx1015
要回复问题请先登录或注册
3 个回复
kennywu76 - Wood
赞同来自: rochy 、lbx6z 、laoyang360 、exceptions 、cccthought
或者觉得doulbe精度过高,浪费存储空间的话,也可以用scaled_float,看起来也是OK的
zqc0512 - andy zhou
赞同来自:
wjx1015
赞同来自:
如 "price": {
"type": "keyword"
}
是这样的么? 我测试貌似没有生效