More consistent highlight query building