# Words with - in elastic search

**URL:** https://discuss.elastic.co/t/words-with-in-elastic-search/223722
**Category:** Elasticsearch
**Created:** [March 16, 2020, 9:52am UTC](https://discuss.elastic.co/t/words-with-in-elastic-search/223722 "2020-03-16T09:52:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vaibhav\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vaibhav_sharma/32/64497_2.png) [@Vaibhav\_Sharma](https://discuss.elastic.co/u/Vaibhav_Sharma)
#### Post date: [March 16, 2020, 9:52am UTC](https://discuss.elastic.co/t/words-with-in-elastic-search/223722/1 "2020-03-16T09:52:11Z")

</div>

I have string like "DMZ-trust", when I search in elastic it shows result for DMZ and trust but not for complete word "DMZ-trust". Which property defines this behavior in elastic and how to change it.

I am using this mapping and query:

```auto
 {
         "mappings": {
            "policy_rule": {
                "properties": {
                    "display_name": {
                        "index": "analyzed", 
                        "type": "text", 
                        "fields": {
                            "_lowercase": {
                                "type": "text", 
                                "analyzer": "case_insensitive"
                            }, 
                            "_raw": {
                                "index": "not_analyzed", 
                                "type": "keyword"
                            }
                        }
                    }
}}}

```

Query:

```auto
{"query":{"bool":{"must":[{"multi_match":{"query":"DMZ-trust","fields":["display_name"],"type":"cross_fields","operator":"or"}}]}}}

```

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [March 16, 2020, 10:02am UTC](https://discuss.elastic.co/t/words-with-in-elastic-search/223722/2 "2020-03-16T10:02:04Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). 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.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 13, 2020, 10:02am UTC](https://discuss.elastic.co/t/words-with-in-elastic-search/223722/3 "2020-04-13T10:02:09Z")

</div>

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