In 2.x you can use the `_design_docs` endpoint - e.g. http://hostname/mydb/_design_docs.
On 6 September 2017 at 09:57, Stefan du Fresne <[email protected]> wrote: > From looking at it, the second one should work. If you're getting no docs > returned I'd suggest working up to it to make sure some base part of your > process is not broken. For example, create a view that emits for every > document, then every id of every document, then add the if statement in there. > > Stefan >> On 5 Sep 2017, at 22:13, Aycrigg, Ben <[email protected]> wrote: >> >> I have tried a couple of ways (using Fauxton with CouchDB 2.1.0) to retrieve >> Design documents only, but with no luck so far, meaning no documents >> returned. Can anyone tell me what is wrong with these? >> >> // if the document structure contains the "views" Key: >> function (doc) { >> if(doc.views) >> emit(doc._id, doc._rev); >> } >> >> // if the document ID starts with "_design": >> function (doc) { >> if(doc._id.substring(0,7) == "_design") >> emit(doc._id, doc._rev); >> } >> >> >
