On Mar 23, 2016, at 4:19 AM, Brendan Duddridge 
<[email protected]<mailto:[email protected]>> wrote:

How can I emit unique values in my map block? Is there a way to do that easily 
or will it require keeping an array of already emitted values, ensuring that I 
don't emit another one with the same value? I just don't want duplicate keys in 
my view.

Duplicate values or duplicate keys?

If your map block just calls emit() once, the docID will be unique in the 
index. If you call emit() multiple times, you can append a different string to 
the docID in each emit() call, like “-1”, “-2”, etc.

But I have a feeling I’m misunderstanding your question…

—Jens

-- 
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/195397D6-8211-4FE1-96E7-60233BD6C285%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to