「日付」フィールドと「グループ」フィールドを持つドキュメントがあります。そして、これは私の見解です:
byDateGroup: {
map: function(doc) {
if (doc.date && doc.group) {
emit([doc.date, doc.group], null);
}
}
}
これと同等のクエリは次のとおりです。
select * from docs where group in ("group1", "group2") order by date desc
この単純な解決策が頭に浮かびません。:(