Improve couchdb views call by filtering on the couchdb side directly.