Number is being changed


#1

Hello! I'm having some problems with large numbers in my database. They're large, but well within the limit for the long type. Here's a simple example that shows it 100% of the time:

POST numbertest/bleh/
{
  "bleh" : -31112115595161611
}

GET numbertest/_search
{
  "query": {
    "match_all": {}
  }
}

Returns (in Kibana):

"_source": {
          "bleh": -31112115595161612
        }

My -31112115595161611 is changing to -31112115595161612. Any ideas?

Trying some more things, -31112115595161613 gives -31112115595161612 and -31112115595161614 gives -31112115595161616.

Edit: I let ES create the mapping, and it assigned the value to the 'long' data type.

Thank you!


(Thiago Souza) #2

What is the Elasticsearch version?


#3

Hi Thiago. Version 5.3.


(Thiago Souza) #4

Can you try retrieving the docs via curl and check if the problem persists? For instance:

$ curl http://<address>/numbertest/_search?pretty

#5

I get the correct number when using curl (so I assume my application will as well). Am I correct in thinking this might be a bug with Kibana or my browser? Thank you for the suggestion!


(Thiago Souza) #6

It's a bug in Kibana https://github.com/elastic/kibana/issues/1274


#7

Ah, thank you!


(system) #8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.