Search by multiple keys in CouchDB
While developing a simple Twitter clone on V8CGi + CouchDB stack, we faced an interesting problem. We have a CouchDB database with users and messages. Each user has many followers and he'd like to see messages from all these followers. So we need to query tweets database for all documents that have author belonging to the list. In SQL it's something as simple as: SELECT * FROM tweets WHERE author IN ("szymon", "wiktor", "marek") SORT BY timestamp; In CouchDB it turned out to be an open issue https://issues.apache.org/jira/browse/COUCHDB-523 As far as I remember we ended up with running two separate queries. I'd be happy to hear how others solved this!