> On Feb 17, 2015, at 6:31 AM, Horatiu Potra <[email protected]> > wrote: > > but from what I read it's not recommend to capture other external > variables(local variables from within the function I set the block) in > mapBlock from CBLView. Is this correct ?
More than not recommended, it will cause bugs. The map function is used to create a persistent index, so if it doesn’t behave the same way every time it’s called, you won’t have a self-consistent index and your view query results won’t make sense. > Right now I can get all documents of a certain type and after that parse them > until I found the item I need. Is there another way to get the item without > actually parsing the entire CBLQueryEnumerator ? I know about postFilter > property of CBLQuery but I was thinking if there is another way. It depends entirely on what it is you’re looking for in the document, i.e. what the search criteria are. I don’t think I can offer help unless you give some more details…? —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/4F9851FC-8DB4-43A0-B7EE-925741B08154%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
