How to query keyword nested field that can be an integer values in ElasticSearch?

This is example of field in ES document. How can i query 'prices.value' that can be only integers?

In this case, value is "150.99" and can fully be converted to integer. But sometimes in can be a text something like "value": "a lot" and i want to exclude document with this values.

"prices": [
     {
      "currency": "RUR",
      "id_offer": 605994811,
       "id_prcdoc": 42172,
        "id_prcknd": 20859,
         "info": {},
         "min_order": null,
         "sell_by": null,
         "value": "150.99"}]
Index of this field:

    "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
          }
        }
      }

And sometimes it 'value' field can be '0.00' and probably i want to exclude this values to..

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.