You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Highlight when search term is tokenized into individual words #821
We parse our search query into individual terms, which means the builtin highlighting functionality doesn't highlight some results. For example, if we search for "John Boston", and a result of "John Smith Boston" does have any highlighting applied. It seems that the highlight function supports o.pattern being an array, but I can't work out how to split the query on space. Is there a way of customizing the pattern which is passed into the highlight function?
When I get a chance I'll take a look to see what would need to be done in order to support this. In the meantime, feel free to dive in on your own. This is definitely something I'd like to support.
This would be a great feature. Example: "hotels with spa", when typing "hotels" highlighting works, but when we type "hotels spa", neither hotel or spa are highlighted (but the correct suggestion is shown).
Activity
BrentWheeldon commentedon Apr 9, 2014
PS I'm happy to send a PR for this if I can get some guidance on where you'd like this customization to live.
jharding commentedon Apr 23, 2014
When I get a chance I'll take a look to see what would need to be done in order to support this. In the meantime, feel free to dive in on your own. This is definitely something I'd like to support.
BrentWheeldon commentedon Apr 23, 2014
Thanks, @jharding. Do you think this should be a default behavior, or something that one could configure?
jharding commentedon Apr 23, 2014
I'd lean towards default behavior.
brandonburkett commentedon Feb 10, 2015
This would be a great feature. Example: "hotels with spa", when typing "hotels" highlighting works, but when we type "hotels spa", neither hotel or spa are highlighted (but the correct suggestion is shown).
Thanks,
Brandon
Highlighting of individual words in suggestions