> On May 21, 2015, at 12:57 PM, [email protected] 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/37EEC626-AFE0-444B-BC8C-7F03D439A8D2%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to