我使用Lucene.Net 2.9.2。我想使用突出显示功能来实现此功能:
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.";
我想要这个结果:
"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."
但我得到了这个:
"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."
可能导致这种差异的原因是什么?
答案 0 :(得分:0)
你可能没有阻止你的输入。例如,尝试使用Porter stemmer。