> To sort by date you should emit( [doc.user_group, doc.updated_at], doc.type)
> - however documents will still be sorted by user group first.
>
> With such keys you query a perticular date range by providing, for instance,
> startkey=["developers",2011-01-04]&endkey=["developers",2011-02-04]
> (url-encoded)
>
> You will still be able to do simple queries like : key=["developers"]
>
Hi Martin. A quick follow up. It looks like this won't work. When I
specify key=["developers"] with emit ([doc.user_group,
doc.updated_at], doc.type) , it emitted nothing. The output is like
this:
{"total_rows":100,"offset":0,"rows":[]}
There are 100 rows passed the "if" check and that number is correct.
Are there any typos in the syntax or am I doing something wrong?
--
Best regards,
He Shiming