Whoa, so glad I asked because that is exactly what I was worried about (slow indexing because I know my documents are large). Thank you for that information and guidance.
FYI, it seems like the examples in your online documentation do this, which is where I got the idea. Would be very helpful if your comments were put in the documentation for others, e.g. what are appropriate key/values, what is grouplevel and how it works, etc. Cheers, Ragu On Monday, April 21, 2014 5:26:14 PM UTC-7, Jens Alfke wrote: > > > On Apr 21, 2014, at 5:08 PM, Ragu Vijaykumar <[email protected]<javascript:>> > 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/b98fa16a-2b02-4ece-8e60-8068733d5240%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
