> On Sep 2, 2014, at 10:17 AM, Sherry Ummen <[email protected]> wrote: > > Hmm ok then I should try with View but one thing I don understand how to emit > multiple properties?
Call the emitter function with the value being an array or dictionary/map. Basically you can pass any JSON-compatible object as the key or value. Here are the docs on keys/values <http://developer.couchbase.com/mobile/develop/guides/couchbase-lite/native-api/view/index.html#keys>. There are some subtleties, so be sure to read them. > And regarding 90Mb data. Hmm yeah the data is huge I can't help it but hmm > yeah I have been storing it like JSON data. Infact I can try using > attachments. > I am using couchdb with lite so that I can store huge data. The fact that you can store huge document bodies doesn't mean that you should :) They'll slow down CouchDB too. > So that means attachment is treated somehow differently? Yes. Only the attachment metadata (an "_attachments" property) is kept in the document itself. The attachment data is only read on demand, through the CBLAttachment API. There's even a streaming API. Attachments are not read when indexing so they don't slow that down. I recommend you keep only the important fields in the document body — the ones you need for indexing or for displaying in a bulk UI like a list/table view — and put the rest of them in an attachment of type application/json. —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/C8A1B3F7-90CD-4206-A449-E7D380A0F647%40couchbase.com. For more options, visit https://groups.google.com/d/optout.
