I would like to load a random document out of a set of documents stored in a CouchDB database. The method for picking and loading the document should conform to the following re
How about "abusing" a view's reduce function?
function (keys, values, reduce) { if (reduce) return values[Math.floor(Math.random()*values.length)]; else return values; }