I am having hard time finding out how to query on multiple keys and sorting by date. In fact I would like to translate the following SQL :
SELECT * FROM THREADS WHERE GROUP_ID IN (1,2,3) ORDER BY THREAD.DATE;
So far I was passing in the query keys=[1,2,3] This returns the threads but they are not sorted.
I could also sort them but only on one GROUP_ID (having as key :[group_id, date]): startkey=[GROUP_ID,{}]&endkey=[GROUP_ID]&descending=true
Yet, I couldn't combine it.
Anyone know a solution ?
Thanks a lot,
Patrick