After writing a Grok to extract values from a MariaDB Slow Query log, I noticed that the Field Statics was not validating one of the fields (mariadb_query_time) as a number. In the Grok they were filtered as “%{BASE10NUM:mariadb_query_time;float}”. Then, I changed it to “%{NUMBER:mariadb_query_time;float}”. Saved the Grok and waited for new messages to come.
When checking how these values were been stored, it was possible to see that it is correctly stored as a number for the new occurrences, for instance:
on first ingest elasticsearch guess the field type - if that type had changed for whatever reason, rotate the active write index and it will again guess.
To force a specific field type you need to have a custom mapping.
What will not work at all is changing that after ingest.