How to filter not_analyzed index using query_string

PUT index /_mapping /type  {
          "entityName": { "type": "string" ,"index": "not_analyzed" ,"doc_values": true}
    }
PUT index/doc/1
{
     ` "entityName": "MML Code"`
}

GET/index/_search{
 'query': {
            'match' : {
              'entityName' : {
                  'query' : '*m*',
                  'type' : 'phrase'
              }
          }
  }
}	  
**_Result_**

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

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.

Please format your code using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

Please edit your post.

Please check now

Ok. I don't think I can copy and paste your example to reproduce in Kibana console as the syntax is mostly incorrect.

Anyway, could you explain the use case? Do you really want to run wildcard queries like this?

In case it helps, there is a similar thread here:

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