view output is different from 2.5 to 3.0 for numbers

6 views
Skip to first unread message

Niels Boldt

unread,
Feb 11, 2015, 8:59:18 AM2/11/15
to couc...@googlegroups.com
Hi

I'm having some views where output have changed when upgrading to 3.0 from 2.5

The documents I work with are just pure numbers, for instance when I see a document in the ui, it will just show the value 2907 for that particular document. Its just integer values

This is the same for both 3.0 and 2.5

However, my view output varies

For 2.5 a row in the view is

{"id":"frontend/tracking/email/1SS6E","key":["frontend","/","tracking","/","email","/","1SS6E"],"value":224639}
For 3.0 a row in the view are
{"id":"frontend/tracking/email/JNSI4","key":["frontend","/","tracking","/","email","/","JNSI4"],"value":"MjM5ODk4NQ=="}
Note the difference in the "value": .. 
For 2.5 it is as expected a number, like 224639
For 3.0 is is a kind of encoded string of the number, like "MjM5ODk4NQ=="
For both clusters the map part of the view view is defined as
function (doc, meta) {
  if( meta.id.match(/^__delta.*/) == null ){
    emit(meta.id.replace(/\//g,'#/#').split('#'), doc);
  }
}
and no reduce part
Can this behaviour be changed? Is it a bug in cb 3.0?
I'm pretty sure that MjM5ODk4NQ== is a base64 encoded version of 2398985, but I would like to avoid doing this decoding

Thanks
Niels






--
BinaryConstructors ApS
Vestergade 10a, 4th
1456 Kbh K
Denmark
phone: +4529722259
web: http://www.binaryconstructors.dk
mail: n...@binaryconstructors.dk
skype: nielsboldt

Siri

unread,
Feb 12, 2015, 5:41:58 AM2/12/15
to couc...@googlegroups.com
Niels,

We will investigate. Can you please share a sample document?

Thanks,
Siri
Reply all
Reply to author
Forward
0 new messages