[英]Elasticsearch mapping to not index negatives numbers
Is there a way to set up our elasticsearch mapping so that a field is excluded or nulled in the elasticsearch index if the field in the java object (an int) is -1? 有没有一种方法可以设置我们的Elasticsearch映射,以便如果Java对象(一个int)中的字段为-1,则在Elasticsearch索引中排除该字段或将其设为空?
Thanks in advance for any comments or answers. 预先感谢您的任何意见或答案。
Take a look at creating a transform step in your mapping . 看一下在映射中创建转换步骤 。 (You could have a script null out the value for negative numbers here)
(您可以在此处使用脚本使负数的值无效)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.