Long type field is getting converted to integer

I have a field id which is stored as long.
The mapping is -

"id": {
"type": "long",
"store": true
},

If the value of id is small and I retrieve the id it is returning an integer type data, which is causing a Class cast exception.
If the value is large it returns a long type data.
Is there any way I can force the data type to be long

Which client are you using?

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