Filtering object

I do not understand why this is not working.

mapping :

{
  "properties": {
    "id": {
      "type": "integer"
    },
    "tags": {
      "properties": {
        "value": {
          "type": "text"
        },
        "weight": {
          "type": "integer"
        }
      }
    },
    ,
    "civility": {
      "type": "text"
    }
.....
}

query: weight 13 EXISTS

{
  "query": {
    "bool": {
      "must": {
        "match_all": {}

      },
      "filter": {
        "match": {
           "tags.weight":13
        }
      }
    }
  }
}

Results :

{
    "took": 2,
    "timed_out": false,
    "_shards": {
        "total": 5,
        "successful": 5,
        "skipped": 0,
        "failed": 0
    },
    "hits": {
        "total": 0,
        "max_score": null,
        "hits": []
    }
}

Can someone help me please!Preformatted text

Welcome!

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

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