On Apr 21, 2014, at 5:08 PM, Ragu Vijaykumar <[email protected]> wrote:
> I just noticed that CBLQueryRow has a document property that returns a > CBLDocument. If this is the case, when we write our MAPBLOCKs, is it > necessary to emit the doc that is passed in? Can I just access that document > via the QueryRow.document property? Emitting the document as the value is strongly discouraged. It's not necessary, as you've seen, and it can greatly slow down indexing because of the extra JSON conversions. In general you should only emit the values you need for your queries. If you don't need values, or if you just want to grab the documents, emit nil for the value. (The reason some people do it is because accessing the document via the query row value is slightly faster than fetching the document from the database. But the difference is minor, and you pay for it with slower indexing, which can be a real pain point in Couchbase Lite.) --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/3B3F3689-33E3-4EA5-B361-EE66C0912F59%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
