getDocLisp query improved.