simplify document query