سؤال

In couchdb I need to filter by key and which is done like this.

{
   "_id": "_design/test",
   "_rev": "6-cef7048c4fadf0daa67005fefe",
   "language": "javascript",
   "views": {
       "all": {
           "map": "function(doc) { if (doc.blogId) {emit(doc.key, doc);} }"
       }
   }
}

However the results should be ordered by another key (doc.anotherkey). So using the same function how do I achieve both filtering and ordering by another key.

Thank you

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top