Hi,
I have mapping like this:
"mappings": {
"dynamic": "strict",
"properties": {
"name": {
"type": "text"
}
}}
when I add new document:
POST /my_index/_bulk
{ "index":{} }
{"name":123}
everything is fine and result of search is:
"hits": [
{
"_index": "my_index",
"_id": "gUuDNooBpc7sew2t4t-R",
"_score": 1,
"_source": {
"name": 123
}
},
{
"_index": "my_index",
"_id": "gkuGNooBpc7sew2tud_d",
"_score": 1,
"_source": {
"name": 123
}
},
{
"_index": "my_index",
"_id": "g0uHNooBpc7sew2tL9_4",
"_score": 1,
"_source": {
"name": 123
}
}
Question
How to make ES to not accept incorrect type data?
So if field is text, numbers should be rejected