Optimizations in the highlighting of the result set