开发者

Highlighting in lucene

开发者 https://www.devze.com 2023-02-15 01:11 出处:网络
I am stuck .I am using a Reader to extract the content of document and I woul开发者_如何转开发d like to highlight it in search time .

I am stuck .I am using a Reader to extract the content of document and I woul开发者_如何转开发d like to highlight it in search time . How can I do that ? Someone can show some code please ?

thank you .


lemoos, Please see this question and Nick Hrycan's blog post. Note that this is highly version-dependent, so you will probably need to tweak this to your version of Lucene.

BTW, Solr has much simpler highlighting - if you have not invested a lot of time and effort in Lucene, you may consider switching to Solr.

0

精彩评论

暂无评论...
验证码 换一张
取 消