# How to create an Elasticsearch mapping with not\_analyzed nested fields?

**URL:** https://discuss.elastic.co/t/how-to-create-an-elasticsearch-mapping-with-not-analyzed-nested-fields/25863
**Category:** Elasticsearch
**Created:** [July 19, 2015, 11:46pm UTC](https://discuss.elastic.co/t/how-to-create-an-elasticsearch-mapping-with-not-analyzed-nested-fields/25863 "2015-07-19T23:46:32Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![JEB](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeb/32/1615_2.png) [@JEB](https://discuss.elastic.co/u/JEB)
#### Post date: [July 19, 2015, 11:46pm UTC](https://discuss.elastic.co/t/how-to-create-an-elasticsearch-mapping-with-not-analyzed-nested-fields/25863/1 "2015-07-19T23:46:33Z")

</div>

How do I create a mapping with nested fields, where the nested fields are not\_analyzed?

I can't figure out the correct mapping, see my example below.

Data which is indexed into the fields taxonomyHMG.0, taxonomyHMG.1,  
taxonomyHMG.2, etc. is processed through the standard tokenizer (can be  
tested by running a facet query).

This happens although all the nested fields are set to "not\_analyzed". I am running ES 1.4.5. What am I missing?

```
    "taxonomyHMG": {
            "properties": {
            0: {
                "type": "string","index": "not_analyzed"
            },
            1: {
                "type": "string","index": "not_analyzed"
            },
            2: {
                "type": "string","index": "not_analyzed"
            },
            3: {
                "type": "string","index": "not_analyzed"
            },
            4: {
                "type": "string","index": "not_analyzed"
            },
            5: {
                "type": "string","index": "not_analyzed"
            },
            5: {
                "type": "string","index": "not_analyzed"
            },
            }
```

---

<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: [July 6, 2017, 12:00am UTC](https://discuss.elastic.co/t/how-to-create-an-elasticsearch-mapping-with-not-analyzed-nested-fields/25863/2 "2017-07-06T00:00:32Z")

</div>


