Jens, Thanks for the quick response.
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? On Thursday, May 21, 2015 at 1:03:49 PM UTC-5, [email protected] wrote: > > I have a situation where i am trying to use "psuedo" joins where the doc > types are ticket and schedule where I want to emit both types of documents. > The schedule document has eventid, year, minute, second and the ticket > document has the schedule id. > > In the if statement for a schedule doc, I will emit([doc[eventid], > doc[year], doc[month], doc[day], doc[scheduleid], name) > In the if statement for a ticket doc, I want to lookup the eventid, year, > month, day from the scheduleid in the ticket document. then > emit([schedule.event, schedule.year, schedule.month, schedule.day, > doc["schedule"], NULL). > > I will reduce to get ticket count per event. My question is to handle how > to look up a schedule document from within mapblock. I have got "thread > exception" error in my first go at this, but before I continue to develop > solution I wanted to make sure this is the best solution. Obviously, I can > put event, year, month, day in ticket documents but this is redundant > information and may lead to errors if I have to change dates of schedule, > but I wanted to know if it was a good practice to look up information on > another document inside the mapblock on background thread. I realize that > the examples are not written in perfect objective c syntax. > > I hope I am making myself clear. Please respond. > -- 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/268d7f58-a505-446b-a6c8-d21916b91831%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
