Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precision lost for long numbers #10055

Closed
xgwu opened this issue Jan 25, 2017 · 1 comment
Closed

Precision lost for long numbers #10055

xgwu opened this issue Jan 25, 2017 · 1 comment
Assignees
Labels
bug Fixes for quality problems that affect the customer experience

Comments

@xgwu
Copy link

xgwu commented Jan 25, 2017

Kibana version:
v5.1.2
Elasticsearch version:
v5.1.2
Server OS version:
CentOs6.4 Final
Browser version:
Google Chrom 55.0.2883.95 (64bit)
Browser OS version:
macOS Sierra 10.12.2
Original install method (e.g. download page, yum, from source, etc.):
Download page
Description of the problem including expected versus actual behavior:
Long value lost precision when displayed in Kibana
Steps to reproduce:

  1. Create a test index with one keyword field.
curl -XPUT 'localhost:9200/test_me?pretty' -d'
{
  "mappings": {
    "logs": {
      "properties": {
        "traceId": {
          "type": "keyword"
        }
      }
    }
  }
}
'
{
  "acknowledged" : true,
  "shards_acknowledged" : true
}
  1. Index a document with a long value
curl -XPOST 'localhost:9200/test_me/logs?pretty' -d'
{
  "traceId": 1026314602185332762
}
'
{
  "_index" : "test_me",
  "_type" : "logs",
  "_id" : "AVnTfrmIx_--4WMw0XSC",
  "_version" : 1,
  "result" : "created",
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "created" : true
}
  1. Discover the index in Kibana and value from source has it precision lost. The last two digits are truncated.
    image

  2. Create another index with a long field

curl -XPUT 'localhost:9200/test_me_long?pretty' -d'
{
  "mappings": {
    "logs": {
      "properties": {
        "traceId": {
          "type": "long"        }
      }
    }
  }
}
'
{
  "acknowledged" : true,
  "shards_acknowledged" : true
}
  1. Index the same document into it
    curl -XPOST 'localhost:9200/test_me_long/logs?pretty' -d'
{
  "traceId": 1026314602185332762
}
'
{
  "_index" : "test_me_long",
  "_type" : "logs",
  "_id" : "AVnThGtgx_--4WMw0XSM",
  "_version" : 1,
  "result" : "created",
  "_shards" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "created" : true
}
  1. Discover the index in Kibana, the last two digits are not correct.
    image

If switching to json tab, the last two digits are truncated.
image

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

@epixa epixa added bug Fixes for quality problems that affect the customer experience :Discovery labels Jan 30, 2017
@Bargs
Copy link
Contributor

Bargs commented Feb 2, 2017

This is a javascript limitation, duplicate issue here: #1274

screen shot 2017-02-02 at 3 31 14 pm

@Bargs Bargs closed this as completed Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience
Projects
None yet
Development

No branches or pull requests

3 participants