How do I make a number field from an extractor?

Important to note that Elasticsearch sets the field type on index creation so if you already have a field in your current index called total_delay as a keyword, @Aksel’s rule won’t affect the type until you rotate the index. (System/Inidicies → edit the index, click on Maintenance button and rotate index).

I wrote up a note on historical correction of index types here - it was a while back though with Elastic 6.x so if you have 7.10, there may be some differences.

If you were to use the total_delay field to create a NEW field like this, the new field would start as a long in the current index.

set_field("total_mail_delay", to_long(total_delay));

2 Likes