这是 ES 文档中的字段示例。我如何查询只能是整数的“prices.value”?
在这种情况下,值为“150.99”,可以完全转换为整数。但有时 in 可以是类似 "value": "a lot" 的文本,我想排除具有此值的文档。
"prices": [
{
"currency": "RUR",
"id_offer": 605994811,
"id_prcdoc": 42172,
"id_prcknd": 20859,
"info": {},
"min_order": null,
"sell_by": null,
"value": "150.99"}]
该字段的索引:
"prices": {
"type": "nested",
"properties": {
"currency": {
"type": "keyword"
},
"id_offer": {
"type": "integer"
},
"id_prcdoc": {
"type": "integer"
},
"id_prcknd": {
"type": "integer"
},
"min_order": {
"type": "keyword"
},
"sell_by": {
"type": "keyword"
},
"value": {
"type": "keyword",
"index": false
}
}
}
有时它的“值”字段可以是“0.00”,可能我想将此值排除在..