_design/attachmentsThis view allows determining which documents have attachments and how much data is being taken up by those attachments.
allThis handles documents attached using CouchDB's attachment mechanism (which generally should not be used in the nEDM systems) and those using the FileServer.
mapfunction(doc) {
var k;
if (doc._attachments) {
for (k in doc._attachments) {
emit([doc._id, k], doc._attachments[k].length);
}
}
if (doc.external_docs) {
for (k in doc.external_docs) {
emit([doc._id, k], doc.external_docs[k].size || 0);
}
}
}reduce: _statsThis is generally only used for offline querying
nedm/measurements:
http://raid.nedm1/nedm%2Fmeasurements/_design/attachments/_view/all?stale=update_after.pynedm: