-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FVH highlighter duplicates the highlight text #29654
Comments
Pinging @elastic/es-search-aggs |
@jacool Thanks for reporting this issue. I can reproduce this as well. @jimczi The bug is on Lucene level, how fragments are being built in BaseFragmentsBuilder.java. @jimczi do you think, we should be fixing it, or with will wait when @romseygeek rewrites highlighters with his new |
The |
Still an issue in Elasticsearch 8.12 with |
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Elasticsearch version (
bin/elasticsearch --version
):6.2.3
Plugins installed: []
JVM version (
java -version
):openjdk version "1.8.0_161"
OS version (
uname -a
if on a Unix-like system):Linux 5137c3a21142 4.9.87-linuxkit-aufs
Description of the problem including expected versus actual behavior:
When using the "sentence" mode with FVH highlighter some highlight texts are returned fully or partially duplicated. See the reproduction example below. The second returned highlight contains the first one fully, thus users would expect only one highlight being returned (the second one) with the first occurrence of the word "go" emphasized as well as the second occurrence. (As is usually the case with this highlighter when the searched word appears nearby several times). Another acceptable solution would be that the first sentence would not appear in the second highlight at all.
Expected result:
"I don't have access to his calendar but let me <em>go</em> and have a chat to him because I'm I'm really came to get just to get this up and running. So if let me <em>go</em> on the when he comes in I'll have to put it down and try and look at a time to do this and then I'll let you know as soon as possible candidates. "
In this specific case there is a partial duplication of highlight texts, we have observed full duplication as well in other cases.
Steps to reproduce:
Results:
The text was updated successfully, but these errors were encountered: