简体   繁体   English

Elasticsearch映射到不索引负数

[英]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.

相关问题 Elasticsearch Java API使用映射创建索引失败 - Elasticsearch Java API Create Index with Mapping fails 无法在Elasticsearch 6.1.2的映射中插入“ index”:“ not_analyzed” - Not able to insert “index”:“not_analyzed” in mapping of elasticsearch 6.1.2 有没有办法用elasticsearch java api加载一个包含索引映射的json文件? - is there a way to load a json file containing the mapping of an index with the elasticsearch java api? Elasticsearch:使用Java客户端查找给定索引的所有映射类型 - Elasticsearch : find all mapping types of a given index using the Java client 从数组中提取数字并将它们(正数和负数)划分为单独的数组 - Extract numbers from a array and divide them (positives and negatives) into separate arrays 将2个(小)数字相乘得到负数解,而不是溢出...为什么? - Multiplying 2 (small) numbers gives negatives solution, not overflow…so why? 弹性搜索索引 - ElasticSearch index Jhipster自定义Elasticsearch映射 - Jhipster custom elasticsearch mapping @GeoPointField Elasticsearch 映射错误 - Bad mapping with @GeoPointField Elasticsearch ElasticSearch 6.4:使用 RestHighLevelClient 进行映射 - ElasticSearch 6.4: Mapping with RestHighLevelClient
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM