I think in the case of a document that is binary, the "doc" argument to the map function will be a base64 encoded string. So you can call
var arrayOfBytes = decodeBase64(doc);
you can get an approximation of the size of the doc from doc.length, or an exact answer from arrayOfBytes.length
I think you can do:
if (meta.deleted) emit("deleted")
But all of this is closer to conjucture about how I think it should work, mixed with memories of what the code looks like. I'm not if we have advanced docs on this stuff. CC'ing Karen sho can hopefully point to the place in the docs.
On Thu, Dec 13, 2012 at 5:41 AM, Perry Krug <firstname.lastname@example.org> wrote:
-We discussed a while ago having access within the view code to the binary doc object even if it wasn't json. Do we have any write up on how to get access to it and what's possible? Let's imagine it's just a string or csv...how would you go about attacking it?
-Anyway to get a view on deleted items (as we're keeping them around for the time being with xdcr)?