How to store big int value in elastic

what data type should be used for storing the given value =281471798906391 .as it is out of long-range in java. and I have to use the range query on it. I tried using the keyword, double,it works but the range query doesn't please reply.

Did you tried to map it as long in elasticsearch ?

Have a look at this list: https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html

May be unsigned_long?

unassigned_long has the same range as java long.

According to the documentation there's a difference for the max value.

Did you try?

Could you provide a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

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