using IN query to get documents