How we can highlight search term if we are using IBooleanOperation.
I tried with the below code but it won't accept IBooleanOperation only accepting Query.
var highlightCssClassName="highlight";
var Separator = "...";
var MaxNumHighlights = 5;
var _luceneVersion=Version.LUCENE_30;
var HighlightAnalyzer = new StandardAnalyzer(_luceneVersion);
var HighlightFormatter = new SimpleHTMLFormatter("<span class=\"" + highlightCssClassName + "\">", "</span> ");
var scorer = new QueryScorer(luceneQuery);
var highlighter = new Highlighter(HighlightFormatter, scorer);
var tokenStream = HighlightAnalyzer.TokenStream(highlightField, new StringReader(value));
return highlighter.GetBestFragments(tokenStream, value, MaxNumHighlights, Separator);
Umbraco Examine - Search result highlighting
Hi
How we can highlight search term if we are using IBooleanOperation.
I tried with the below code but it won't accept IBooleanOperation only accepting Query.
Is there any way to achieve this?
is working on a reply...