Continuing the discussion from The term "ost.io" creates trouble for search:
I’d expect it to highlight the whole term, but it highlights just arbitrary words.
Continuing the discussion from The term "ost.io" creates trouble for search:
I’d expect it to highlight the whole term, but it highlights just arbitrary words.
You don’t need the quotes for an exact term match
If this is an easy fix we should fix it @sam
Looks to me like the highlighter just needs to strip out the quotes.
I want to get to fixing this but its a fairly involved fixed, the highlighter needs to understand this behavior, it only highlights words now not full terms.
I really, really want this fixed, it is pretty disastrous from a UI perspective, also I’m not even sure it’s searching for a full quoted phrase in this scenario?
Done per:
per:
https://github.com/discourse/discourse/commit/0791d740a634a70cb8ffb7f762f1a31353560209
I changed it so we only match whole words, centralized the highlighting code and deal with exact terms.
One interesting edge case here is that the really
being in italics in your post breaks the algorithm.
Cause we match the index and then try to match raw, we are going to have to change it to try to do the exact match on a normalized text only version of the post.