That’s not a valid map function. It uses external state, the variables 
“repository” and “indexName”. A map function has to be a pure function that 
always emits the same values given the same input document, otherwise the index 
won’t be consistent.

Another way to think of it is that the map function is for indexing the 
database, not for querying it. Mixing query values into the map function is 
wrong.

—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 mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/CFC3FD11-D188-44D9-A33A-DD0C258A442C%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to