Couch DB filter by key and sort by another field
-
30-10-2019 - |
题
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
没有正确的解决方案
不隶属于 StackOverflow