improve FR index logic around highlighting documents