I have a bunch of MP3 metadata in CouchDB. I want to return every album that is in the MP3 metadata, but no duplicates.
A typical document looks like this:
Have a look at View Cookbook for SQL Jockeys' Get Unique Values section.
I believe your map/reduce would look something like:
function map(doc) { emit(doc.album, null); } function reduce(key, values) { return null; }
Remember to query with the extra parameter group=true
group=true