In the search results page, because we trim descriptions, we do not display the matched string from the search query in the description if it occurs after the cut-off.
To Reproduce
search escapes in fmd front end. A releases in error chart is returned. The match is description but you'll see the term escapes is not highlighted in the description because we've trimmed it before this part is shown
Expected Behaviour
you’d expect to see the section of the description where your search query matched and the matched string highlighted, in all search results.
Related to this, if you have multiple words in the query, only the full match will be highlighted. We could improve this by splitting on words and highlighting each word match independently.
Describe the bug.
In the search results page, because we trim descriptions, we do not display the matched string from the search query in the description if it occurs after the cut-off.
To Reproduce
search
escapes
in fmd front end. A releases in error chart is returned. The match is description but you'll see the termescapes
is not highlighted in the description because we've trimmed it before this part is shownExpected Behaviour
you’d expect to see the section of the description where your search query matched and the matched string highlighted, in all search results.
Additional context
No response