MDL-31989: Fixing issues on highlighting query