For an emit with key as an array of say 4 fields, if we specify group level as 
3 then will the keys parameter of reduce function will also be an array with 
element count as 3? I mean to say does group level decides the number of fields 
in each item of keys parameter of reduce function?

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: mobile-couchbase@googlegroups.com <mobile-couchbase@googlegroups.com> on 
behalf of Jens Alfke <j...@couchbase.com>
Sent: Thursday, November 2, 2017 2:08:08 AM
To: Couchbase Mobile
Subject: Re: iOS Swift: Questions



On Oct 30, 2017, at 8:02 AM, 
parvez.qure...@decurtis.com<mailto:parvez.qure...@decurtis.com> wrote:

1.Is it possible to create a CBLView with multiple emit statements like
emit([key1,key2,key3],doc)
emit([key4,key5,key6],doc)

Sure, it’s a common technique.

(As for emitting ‘doc’ as the value — it’s not advisable, but common enough 
that we added a workaround for it. The contents of the doc aren’t actually 
emitted into the view, but the QueryRow object’s .value property will load and 
return the document anyway.
(What is advisable is to figure out what info about the document you need to 
know when querying, and then emit that as the value.)

—Jens

--
You received this message because you are subscribed to a topic in the Google 
Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/mobile-couchbase/LRZP2eWPvXA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
mobile-couchbase+unsubscr...@googlegroups.com<mailto:mobile-couchbase+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/018B53C5-2DF1-48B9-A0DF-1AE890D4C138%40couchbase.com<https://groups.google.com/d/msgid/mobile-couchbase/018B53C5-2DF1-48B9-A0DF-1AE890D4C138%40couchbase.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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/CO2PR05MB2472F6ADCD8DAD9A4887DA30FB560%40CO2PR05MB2472.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to