jprante / elasticsearch-jdbc

JDBC importer for Elasticsearch
Apache License 2.0
2.84k stars 709 forks source link

Import MySQL data, ID error #894

Open sz-sunset opened 8 years ago

sz-sunset commented 8 years ago

data type _id id enterpriseMaterial 806450891548564141 1 806450891548564100 enterpriseMaterial 806450891548564146 1 806450891548564100

sql SELECT ID AS _id,ID .........

There are a lot of similar data

sz-sunset commented 8 years ago

@jprante help mi!

sz-sunset commented 8 years ago

@jprante , it's elasticsearch-head plugin display problem

cch123 commented 8 years ago

yes, because javascript cannot support int64 data and will lose precision if your number is long than 16digit, but the data in es is correct

jprante commented 8 years ago

You can try to convert to string with SQL CAST or CONVERT operator http://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast