Dynamic Mapping Issue-04032016

Hi,

I am trying to create a dynamic template so that every number datatype(dynamically mapped) is indexed=true.
I am using below command to create my index, and the string datatypes are getting indexed, but not the long.

curl -XPUT 'http://localhost:9200/my_index?pretty' -d'
{
"mappings": {
"my_type": {
"dynamic_templates": [
{
"integers": {
"match_mapping_type": "long",
"mapping": {
"type": "long",
"index" : "not_analyzed"
}
}
},
{
"strings": {
"match_mapping_type": "string",
"mapping": {
"type": "string",
"index" : "not_analyzed"
}
}
}
]
}
}
}
'

This is my data

curl -XPUT 'http://IP:9200/my_index/my_type/1?pretty' -d'
{
"my_integer": 5,
"my_string": "Some string"
}'

Please format your code with </> icon so it won't be ugly.

What does this give?

curl 'http://IP:9200/my_index/my_type/_mapping?pretty'