Query issue, dot in field value returning 0 hits

Hello,

There's an issue with the use of . in my field value.

The sample below is a 'valid' query that returns some hits

{
  "query": {
    "bool": {
      "must": [
        {
          "wildcard": {
            "Address": "abcdef*"
          }
        },
        {
          "match": {
            "Message.Code": "AA101"
          }
        },
        {
          "range": {
            "DateCreated": {
              "gte": "2020-01-04",
              "lte": "2020-01-04"
            }
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  }
}

However, the problem starts when I change Message.Code from "AA101" to "AA101.extra", resulting in 0 hits.

{
  "query": {
    "bool": {
      "must": [
        {
          "wildcard": {
            "Address": "abcdef*"
          }
        },
        {
          "match": {
            "Message.Code": "AA101.extra"
          }
        },
        {
          "range": {
            "DateCreated": {
              "gte": "2020-01-04",
              "lte": "2020-01-04"
            }
          }
        }
      ],
      "must_not": [],
      "should": []
    }
  }
}

Please advise how I should go about this.

Thanks!
Sam

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