CouchDb bulk rename -
for example have posts tag names, , decided rename 1 of tags. bulk updating when should know revision not suitable. better if integrated.
check out costco, provides simple interface lets write little function gets applied documents modify them.
you write simple function like:
function (doc) { // ignore documents without tags if (!doc.tags) return doc; (var = 0, len = doc.tags.length; < len; += 1) { // convert tag misspelled "couch-db" real name "couchdb" if (doc.tags[i] === "couch-db") doc.tags[i] = "couchdb"; } return doc; }
Comments
Post a Comment