# Mapping "type" : "integer" with analyzers

**URL:** <https://discuss.elastic.co/t/mapping-type-integer-with-analyzers/64711>\
**Category:** Elasticsearch\
**Created:** [November 2, 2016, 12:28pm UTC](https://discuss.elastic.co/t/mapping-type-integer-with-analyzers/64711 "2016-11-02T12:28:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahesh.maney](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mahesh.maney](https://discuss.elastic.co/u/mahesh.maney)\
**Post date:** [November 2, 2016, 12:28pm UTC](https://discuss.elastic.co/t/mapping-type-integer-with-analyzers/64711/1 "2016-11-02T12:28:19Z")

</div>

Hi,  
We have been migrating from 1.3.2 to 2.3.5 and facing issues with mapping. I have a JSON file with following contents.  
{  
"name": "hasAtleastOneAnswer",  
"analyzer": "keyword",  
"type" : "boolean",  
"participatesIn": ["sort"]  
},  
{  
"name": "children",  
"type": "nested",  
"ref": "file"  
},  
The 'children' tag is referring to another JSON file, contents below;  
{  
"name":"childrenCount",  
"type":"integer",  
"index": "not\_analyzed"  
},  
{  
"name":"applicationId",  
"analyzer":"keyword"  
}  
Now the issue is when i try to add anything to Elasticsearch through java code, i end up in the following exception.  
"MapperParsingException[Mapping definition for [childrenCount] has unsupported parameters: [analyzer : default]]"

What i have understood from reading so far is for primitive data types like integer, long etc., we cannot use "analyzer". We need to use "Index": "not\_analyzed"; which i have tried, but in vain.

My concern is;

1. Why does Elasticsearch makes it mandatory to have analyzers? If i do not need analyzers, how do i tell elasticsearch not use the default analyzer?
2. what analyzer should i use with type integer?

Any lead/suggestions to overcome the above issue is highly appreciated.

Regards,  
Maney

---

<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:07pm UTC](https://discuss.elastic.co/t/mapping-type-integer-with-analyzers/64711/2 "2017-07-05T22:07:25Z")

</div>


