0
votes

I use Lucene.Net 2.9.2. I want to use the highlight feature to implement this function:

highlighter.Keyword = "wiping citroen berlingo";
highlighter.StartTag = "<span>";
highlighter.EndTag = "</span>";

var text = "The Citroen Berlingo has two windscreen wipers at the front and one wiper at the back.  They're great for wiping stuff away.";

I wanted this result:

"The <span>Citroen</span> <span>Berlingo</span> has two windscreen <span>wipers</span> at the front and one <span>wiper</span> at the back.  They're great for <span>wiping</span> stuff away."

But I got this:

"The <span>Citroen</span> <span>Berlingo</span> has two windscreen wipers at the front and one wiper at the back.  They're great for **<span>wiping</span>** stuff away."

What might be causing this difference?

1
show us some code so we can figure out where these asterisks in the output come fromJf Beaulac

1 Answers

0
votes

You're probably not stemming your input. Try using the Porter stemmer, for example.