JSON ints sometimes being mapped to floats #27935
Labels
>bug
feedback_needed
:Search Foundations/Mapping
Index mappings, including merging and defining field types
Team:Search Foundations
Meta label for the Search Foundations team in Elasticsearch
Elasticsearch version (
bin/elasticsearch --version
): Version: 5.6.2, Build: 57e20f3/2017-09-23T13:16:45.703Z, JVM: 1.8.0_131Plugins installed: []
JVM version (
java -version
):OS version (
uname -a
if on a Unix-like system): Linux ip-10-0-16-177 4.4.0-1035-aws #44-Ubuntu SMP Tue Sep 12 17:27:47 UTC 2017 x86_64 x86_64 x86_64 GNU/LinuxDescription of the problem including expected versus actual behavior:
We have an index which is created daily at midnight UTC. In that index there is a field which is logged as JSON Integer, which sometimes is correctly dynamically mapped in the index to an
long
, and other times is mapped incorrectly as afloat
. There is only one log message logged by the service logging to this index, and that field is always populated with along
value.Other fields from the same structure logged at the same time are logged as JSON integers, but have their index field values created at
float
s. I was unable to find a recent day-based index where these other fields mapped to anything other than afloat
.It's not clear to me why this is the case. From my understanding the first document indexed when the index is created sets the types of the fields, and the first document should have set that field as a
long
. A test where I create a new test index and thenPOST
a document into it creates all fields expected aslong
.Steps to reproduce:
I cannot reliably reproduce this, as it seems to only be happening in our production environment. I'm mostly looking for guidance as to how a logged JSON int coulf be mapped to a
float
, or, if the only way that is possible is that we actually logged a JSON float somehow, and I should do perhaps into our production system.The text was updated successfully, but these errors were encountered: