I have an index named users and i have a provided a field called user_id which is int type.The question is it is accepting floating value and string value.This is the index i have created
PUT /users
{
"mappings" : {
"properties": {
"user_id": {
"type": "integer"
}
}
Now here i have provided some values for testing
POST /users/_doc/1?refresh=wait_for
{
"user_id" : 12345
}
POST /users/_doc/2?refresh=wait_for
{
"user_id" : 123456
}
POST /users/_doc/3?refresh=wait_for
{
"user_id" : "123456"
}
POST /users/_doc/4?refresh=wait_for
{
"user_id" : 1.234
}
It should not accept the value of string type and floating type but it is not acting like that way