> On May 21, 2015, at 10:28 AM, [email protected] wrote:
> 
> My question is to handle how to look up a schedule document from within 
> mapblock.

You can’t, or rather, it’s illegal. In map/reduce, the map function has to be a 
“pure” function with no dependencies on any state other than its inputs, i.e. 
the document properties. Otherwise the index can become invalid.

In your case, if that schedule document changes in a way that would change the 
data emitted for the ticket document, the ticket document will not be 
re-indexed (only docs that change are re-indexed) so the index data will be out 
of date.

—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/F8577B15-18F3-491B-A1E6-5B896A8D70F6%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to