Closed wangbin closed 9 years ago
Thanks for reporting this.
The problem is that the code is trying to avoid having two highlighted sections overlap. Unfortunately, when you use analyzers that compute n-grams, the tokens are overlapping by design.
I'm reworking the highlighters to still avoid overlapping fragments in general, but allow for them when the tokens themselves overlap.
Hi, I'm learning bleve, following is a small program modified from wiki:
When run the code I got a panic:
I did some research, in Fragment function, I got two TermLocations:
The first one's End is larger than the second's Start, which cause the problem in line 82, my guess is the code should check maxbegin is bigger than start to avoid this problem?