I'm experiencing a strange issue. I've got an index with a template where a given mapping is specified. Such a mapping includes a specific field which should be a
It works perfectly for almost all the documents in the index, but for some of them, even if the field acts as a long (I can do metric like avg and max over it), it does look like a string in the JSON.
Apparently it is causing some problems when another team queries ES via API, since the returned value is a string.
Here it is how the field appears (correctly) in most of the documents
Here it is how it appears in some documents
I even tried running a reindex on the original index, specifying again the mapping of that field, but result is the same.
Does anybody have any ideas about why it acts like that?