首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

【Lucene】三个高亮展示模块的简单示例-Highlighter

2013-09-12 
【Lucene】三个高亮显示模块的简单示例-HighlighterLucene针对高亮显示功能提供了两种实现方式,分别是Highli

【Lucene】三个高亮显示模块的简单示例-Highlighter

Lucene针对高亮显示功能提供了两种实现方式,分别是Highlighter和FastVectorHighlighter

这里的三个示例都是使用Highlighter;

示例代码:

<B>China</B> has lots of people,most of them are very poor。<B>China</B> is very big.<B>China</B> become strong now,but the poor people is also poor than other controry<span style="backgroud:red">China</span> has lots of people,most of them are very poor。<span style="backgroud:red">China</span> is very big.<span style="backgroud:red">China</span> become strong now,but the poor people is also poor than other controryChina has lots of people,most of them are very <span style="backgroud:red">poor</span>。China is very big.China become strong now,but the <span style="backgroud:red">poor</span> people is also <span style="backgroud:red">poor</span> than other controry本次命中数据:1<B>床</B><B>前</B><B>明月光</B>,疑是地上霜

【本例参考《Lucene In Action》】

热点排行