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

Popular posts from this blog

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

c++ - Convert big endian to little endian when reading from a binary file -