Hi,
Not sure if this is a bug, just wanted to check here first:
-
create an index with an integer mapping:
curl -XPUT 'http://localhost:9200/shmap/' -d '{
"settings" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"mappings" : {
"type" : {
"dynamic" : false,
"properties" : {
"shint" : {
"type" : "integer",
"index" : "not_analyzed",
}
}
}
}
}' -
insert a string that is made of integers:
curl -XPOST 'http://localhost:9200/shmap/type' -d '{
"shint" : "00000001"
}' -
Get it back. Note that the string is still a string, even though the type is integer:
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.0,"hits":[{"_index":"shmap","_type":"type","_id":"AVfgtbAbNiGlzqOiG3dD","_score":1.0,"_source":{
"shint" : "00000001"
}}]}}
Is this a bug? If not, why not?