I have a dynamic template where my string
mapping is set up as below:
{
"string_fields": {
"match_mapping_type": "string",
"mapping": {
"type": "text",
"fields": {
"numeric": {"type": "double", "ignore_malformed": True},
"date": {"type": "date", "ignore_malformed": True},
},
},
}
}
Now, I only want the .numeric
and .date
sub-fields to be generated if the text is double
or date
respectively. I am confused if in the above case it gets unnecessarily generated for all my ingested strings or does ES handle it smartly. How does it make its decision?
ES Version 7.10