I am using a Couchbase view to emit a few records. Among those records, there is one record which is 19 digit long. When Couchbase view (written in javascript) pulls those record, it rounds off the record into smaller one and loses precision.
-7092643922943239825 is actual number but when retrieved from below view:
function(doc, meta) {
if (doc.docType == 'xyz') {
if (doc.source) {
if (doc.source != null) {
emit([doc.valA, doc.valB, loc], 1);
}
}
}
The output I get is:
[ **-7092643922943240000, 1523365218128317200**, "abc" ]
I was expecting:
"doc": {
"valA": 1523365218128317302,
"valB": -7092643922943239825
}
What am I doing wrong?