# How to not analyzed a field in elasticsearch

**URL:** <https://discuss.elastic.co/t/how-to-not-analyzed-a-field-in-elasticsearch/107718>\
**Category:** Elasticsearch\
**Created:** [November 15, 2017, 10:15am UTC](https://discuss.elastic.co/t/how-to-not-analyzed-a-field-in-elasticsearch/107718 "2017-11-15T10:15:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sidra\_89](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@sidra\_89](https://discuss.elastic.co/u/sidra_89)\
**Post date:** [November 15, 2017, 10:15am UTC](https://discuss.elastic.co/t/how-to-not-analyzed-a-field-in-elasticsearch/107718/1 "2017-11-15T10:15:58Z")

</div>

Hi i have a brand\_name field and its values are like "Hello World" means have spaces in between  
i dont want to analyze it for exact matching

currently my mapping is this

```
"brand_name" => [
                        "type" => "text",                          
                        "fields" => [
                           "keyword" => [
                               "type" => "keyword"
                           ]
                       ]
                    ]

```

how can i achieve this ?

---

<div class="post-metadata">

**Author:** ![Charles.w](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/charles.w/32/15486_2.png) [@Charles.w](https://discuss.elastic.co/u/Charles.w)\
**Post date:** [November 15, 2017, 12:02pm UTC](https://discuss.elastic.co/t/how-to-not-analyzed-a-field-in-elasticsearch/107718/2 "2017-11-15T12:02:46Z")

</div>

Hi,

You can search on brand\_name.keyword. As stated in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html) "Keyword fields are only searchable by their exact value." 😉

Best regards,

Charles Casadei

---

<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:** [December 13, 2017, 12:03pm UTC](https://discuss.elastic.co/t/how-to-not-analyzed-a-field-in-elasticsearch/107718/3 "2017-12-13T12:03:06Z")

</div>

Closed on December 13, 2017, 12:03pm UTC

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