Query documents as if they were in mongoDB