var view = db.GetView("aview");
            view.SetMapReduce((IDictionary<string, object> document, 
EmitDelegate emitter) => {
                if (document["_id"] != null) {
                    emitter(document["_id"], document["_id"]);
                    
                }
            }, null, "1");
            return view;

Why do you need to test that the document ID is not null? Would it ever be null?

Why do you emit the document ID as the value in addition to the key? Why not 
just emit the document ID as the key and null as the value?

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/cb1960b6-4e74-475e-9f30-3e1ef4fbd883%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to