# Not\_analyzed field being analyzed

**URL:** <https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867>\
**Category:** Elasticsearch\
**Created:** [October 8, 2015, 3:39pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867 "2015-10-08T15:39:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![beorn107](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@beorn107](https://discuss.elastic.co/u/beorn107)\
**Post date:** [October 8, 2015, 3:39pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/1 "2015-10-08T15:39:30Z")

</div>

I have the following mapping:

PUT /metrics  
"mappings": {  
"metric": {  
"properties": {  
"Activated": {  
"type": "string",  
"index":"not\_analyzed"  
},  
"Activation Status": {  
"type": "string",  
"index":"not\_analyzed"  
},  
"Activation Time Flag": {  
"type": "string",  
"index":"not\_analyzed"  
},  
"Associate": {  
"type": "string",  
"index":"not\_analyzed"  
},  
"Carrier": {  
"type": "string",  
"index":"not\_analyzed"  
},  
"Date Activated": {  
"type": "date",  
"format": "dateOptionalTime"  
}  
}  
}

I create the index with this mapping and then use Logstash to import some data from SQL Server. However when reviewing the imported data in Kibana the string fields are being marked as analyzed and the visualizations I create using them have the data in the field broken apart.

I am at a loss as to how to get the string fields to not be analyzed. Any help would be very appreciated.

---

<div class="post-metadata">

**Author:** ![softwaredoug](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/softwaredoug/32/22681_2.png) [@softwaredoug](https://discuss.elastic.co/u/softwaredoug)\
**Post date:** [October 8, 2015, 4:47pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/2 "2015-10-08T16:47:48Z")

</div>

Any way to get an example of manually putting a document with these fields? Can you see how logstash is indexing?

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [October 8, 2015, 6:14pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/3 "2015-10-08T18:14:16Z")

</div>

Have you tried reloading the mapping from Kibana? Go to Settings, select the index pattern, then click on the Reload icon. And see if that helps.

---

<div class="post-metadata">

**Author:** ![beorn107](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@beorn107](https://discuss.elastic.co/u/beorn107)\
**Post date:** [October 8, 2015, 10:01pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/4 "2015-10-08T22:01:45Z")

</div>

Thanks for the responses and suggestions. As it turns out the command I was using to set up the index and mapping was not correct. So the index was created and no error was thrown but no actual mapping was created. When I then imported data into the index the data was auto mapped. Once I got the command correct it worked as expected.

---

<div class="post-metadata">

**Author:** ![prjain](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@prjain](https://discuss.elastic.co/u/prjain)\
**Post date:** [June 16, 2016, 5:39pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/5 "2016-06-16T17:39:59Z")

</div>

Hi ,can you tell me what was incorrect in your mapping ? Because I am facing the exact same problem and cant seem to find a way around it.

Thanks !

---

<div class="post-metadata">

**Author:** ![beorn107](https://avatars.discourse-cdn.com/v4/letter/b/a587f6/32.png) [@beorn107](https://discuss.elastic.co/u/beorn107)\
**Post date:** [June 16, 2016, 6:51pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/6 "2016-06-16T18:51:45Z")

</div>

It was a while ago so I am not exactly sure what was the problem but in looking at it now it seems like I was missing curly braces (in bold in the example below) after the name of the index. I think what helped the most was to install the Sense Chrome plug-in. It helped with validating the json.

put /strlvlmetrics  
**{**  
"mappings": {  
"metric": {  
"properties": {  
"partnerorderid": {  
"type": "long"  
},  
"partnerid": {  
"type": "long"  
},  
"store state": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"store city": {  
"type": "string",  
"index": "not\_analyzed"  
},  
"orderitem\_id": {  
"type": "long"  
},  
"equipment name": {  
"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 5, 2017, 10:43pm UTC](https://discuss.elastic.co/t/not-analyzed-field-being-analyzed/31867/7 "2017-07-05T22:43:09Z")

</div>


