Mapping "type" : "integer" with analyzers

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