update query term