added query-strings to db->tempview, doc->retrieve