I meet a problem . When I index an value , for example {"id":
-8848340816900692111},
then i search it ,it shows that "id": -8848340816900692000.
Anyone can help? I want know why does elasticsearch do this and how can i
deal with.
Thanks.
It typically happens if you put data into elasticsearch using Sense or some
other JavaScript-based applications. Large numbers like this one are
getting rounded in JavaScript before they reach Elasticsearch. Please see
for more information about the issue.
On Tuesday, 28 April 2015 23:02:16 UTC-4, Stabaoc wrote:
I meet a problem . When I index an value , for example {"id":
-8848340816900692111},
then i search it ,it shows that "id": -8848340816900692000.
Anyone can help? I want know why does elasticsearch do this and how can i
deal with.
Thanks.
It typically happens if you put data into elasticsearch using Sense or
some other JavaScript-based applications. Large numbers like this one are
getting rounded in JavaScript before they reach Elasticsearch. Please see Long field is rounded · Issue #5518 · elastic/elasticsearch · GitHub
for more information about the issue.
On Tuesday, 28 April 2015 23:02:16 UTC-4, Stabaoc wrote:
I meet a problem . When I index an value , for example {"id":
-8848340816900692111},
then i search it ,it shows that "id": -8848340816900692000.
Anyone can help? I want know why does elasticsearch do this and how can i
deal with.
Thanks.
It typically happens if you put data into elasticsearch using Sense or
some other JavaScript-based applications. Large numbers like this one are
getting rounded in JavaScript before they reach Elasticsearch. Please see Long field is rounded · Issue #5518 · elastic/elasticsearch · GitHub
for more information about the issue.
On Tuesday, 28 April 2015 23:02:16 UTC-4, Stabaoc wrote:
I meet a problem . When I index an value , for example {"id":
-8848340816900692111},
then i search it ,it shows that "id": -8848340816900692000.
Anyone can help? I want know why does elasticsearch do this and how can i
deal with.
Thanks.
What I was trying to say is that the problem is with browsers parsing json.
I am not really sure how you jumped to the conclusion that you cannot use
Java API. Java API doesn't have any of these issues since it is using the
same representation for long as the rest of elasticsearch. JavaScript on
another hand is using a different internal representation of long numbers,
so when you ask JavaScript to parse number -8848340816900692111 it loads it
as -8848340816900692000. Try parsing your document using http://www.jsoneditoronline.org/ and you will see what I mean.
On Wednesday, 29 April 2015 02:24:18 UTC-4, Stabaoc wrote:
On Tuesday, 28 April 2015 23:02:16 UTC-4, Stabaoc wrote:
I meet a problem . When I index an value , for example {"id":
-8848340816900692111},
then i search it ,it shows that "id": -8848340816900692000.
Anyone can help? I want know why does elasticsearch do this and how can
i deal with.
Thanks.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.