For example if a field contains the text "Sed quis lacus mauris. Fusce auctor nunc eget neque interdum volutpat." and I search for "qui", the node will be among the results, but GetHighlight doesn't return anything. If I search for the full word "quis" it works fine.
My implementation is a bit different from the documentation. In a Razor view:
I'm affraid this was too long ago to remember. I don't think I found a way to highlight with LuceneHighlightHelper correctly. Instead I made my own function, which just replaced all keywords with a regexp.
Highlight text in examine search results when matching beginning of words
Hello,
Based on the documentation found here http://our.umbraco.org/wiki/how-tos/how-to-highlight-text-in-examine-search-results I've implemented highlighting of the query text in the results from examine search. It all works fine, except when the query matches only the beginning of a word.
For example if a field contains the text "Sed quis lacus mauris. Fusce auctor nunc eget neque interdum volutpat." and I search for "qui", the node will be among the results, but GetHighlight doesn't return anything. If I search for the full word "quis" it works fine.
My implementation is a bit different from the documentation. In a Razor view:
And then:
Any ideas?
Thanks!
Did you ever get this working correctly? I'm trying to do the same thing. What '@usings' did you need to include?
Hi Joel,
I'm affraid this was too long ago to remember. I don't think I found a way to highlight with LuceneHighlightHelper correctly. Instead I made my own function, which just replaced all keywords with a regexp.
is working on a reply...