Query String Query and leading wildcard

Hello guys,

I have some issue with a certain query string query with a leading wildcard in an indexed array of strings.

I'm using ElasticSearch 5.0.1
The mapping for the document type is the following:

  "templates" : {
    "properties" : {
      "id" : {
        "type"     : "string",
        "index"    : "not_analyzed"
      },
      "name" : {
        "type"     : "string",
        "index"    : "not_analyzed"
      },
      "keys" : {
        "type"     : "string",
        "index"    : "not_analyzed"
      }
    }
  }

The indexed contents in the 'keys' fields are array of dot separated string of a flattened hierarchy.
Exemple. DEV.ES.GeneralInfo.Home , PROD.ES.GenraralInfo.Home, etc.

When I preform the following query
"keys:*ES.GeneralInfo.Home" no results are returned.
However, if I perform a plain "*ES.GeneralInfo.Home" I get results.

I have no idea why specifying the fields return no results, but not specifying the field (which I assume fallback to _all) give me results.

Does anyone have an idea about what is wrong with the query or the mapping? For this field, I'm only interested in full matches or prefix / suffix matches. Partial (A*Z) is not required.

Thanks

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