你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: liubin
#参考 es6.6版本 PUT test01_index/_doc/5 { "x_value":15, "y_value":3 } POST test01_index/_doc/_search { "script_fields": { "my_divide_field": { "script": { "lang": "expression", "source": "doc['y_value'].value != 0 ? doc['x_value'].value / doc['y_value'].value : 0" } } } } #fanhui返回 { "took" : 97, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "skipped" : 0, "failed" : 0 }, "hits" : { "total" : 2, "max_score" : 1.0, "hits" : [ { "_index" : "test01_index", "_type" : "_doc", "_id" : "5", "_score" : 1.0, "fields" : { "my_divide_field" : [ 5.0 ] } }, { "_index" : "test01_index", "_type" : "_doc", "_id" : "1", "_score" : 1.0, "fields" : { "my_divide_field" : [ 0.0 ] } } ] } }
machuan11
赞同来自:
xiaoyanghapi - Elasticsearch 爱好者
要回复问题请先登录或注册
it
3 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: liubin
machuan11
赞同来自:
xiaoyanghapi - Elasticsearch 爱好者
赞同来自: