Thanks. I did not think using two views was an option because I am using CBLTablesource, using one view as the datasource and the other to create a dictionary makes sense.
On Thursday, May 21, 2015 at 3:28:59 PM UTC-5, Jens Alfke wrote: > > > On May 21, 2015, at 12:57 PM, [email protected] <javascript:> wrote: > > Can you offer an alternative to count tickets associated with schedules, > and order them by date? When ticket does not have date information? Should > I store the date information into ticket documents? > > > Create a view that indexes the tickets with scheduleID as the primary key, > then group at level=1 to get the count of tickets for each schedule. > Then create a view that indexes schedules with date as the key. > You’ll need to combine the two together to get ticket count by date. For > example, query the first view and create a dictionary that maps schedule ID > to count, then query the second view and for each schedule look up the > count using the dictionary. > > —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/951f4996-43fe-4d75-ad9d-2e430d8b64bc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
