optimize search highlight