fixed search by keyword and department

couchdb-style views go in app/query/pouchdb_views.js