Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Postings highlighter wrong highlighting #4103
As reported as a comment in #4042, the postings highlighter has a weird behaviour, it seems like it remembers the offsets of the previously highlighted documents. Well, what happens is that it actually highlights the right text against the wrong offsets, because of most likely the silliest mistake one can make working with lucene, that is using doc ids that are relative to the segment they belong as they were unique instead of the doc ids that contain the segment offset too.
The prior test works with new commit however my original issue of not highlighting many fields at all remains.
I am trying to reproduce it with a recreation but so far I could not.
to remind you of the progression of fixes to the highlighter
Do you have any suggestions for recreation? Does highlighting with postings depends on search query at all?
here is a recreation with few mappings similar to my real ones https://gist.github.com/roytmana/7336502
any suggestions towards recreation of the issue would be very helpful
@roytmana i had an example of one not highlighting at all from your example yesterday. when searching for
also got different responses if i used query_string vs match vs match_phrase_prefix
sorry can't provide more details atm
Hi @roytmana, thanks a lot for your feedback!
What you called "scrambled highlighting" has been solved :)
I wonder if you are seeing a regression or a problem that's always been there. Sounds weird that you say the difference is dramatic but you can't reproduce it. It might depend either on your queries or your analysis chain, would be great if you can open another issue with some examples of what doesn't work.
well it worked (except for the wildcards) in the very first drop I tested
I will open a new issue based on my last comment