Solr 仅在邻近搜索中突出显示术语
在Solr中,当执行邻近搜索时,是否有一种简单的方法可以仅突出显示在指定邻近范围内出现的搜索词?
In Solr, when performing a proximity search, is there a simple way to highlight only the search terms that occur within the specified proximity?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这在某种程度上取决于您使用的版本。至少在Solr3.1及以后版本有办法。
实际上,我建议这种突出显示术语向量,在速度、性能和准确性方面具有偏移和位置。
首先,您首先启用 TermVectors 和 Positions + Offsets 来完成特定字段上的邻近突出显示。您需要的第二件事是适用于带有偏移量的 TermVector 的突出显示算法。该算法是 Solr3.1 中的新功能或通过贡献提供。
调整突出显示的参数可以在这里找到:http://wiki.apache.org/solr/HighlightingParameters
特别是参数:hl.highlightMultiTerm和hl.usePhraseHighlighter。
有关术语向量突出显示的更多信息,请参阅本文文章参考
<一href="http://lucene.apache.org/java/2_9_2/api/contrib-fast-vector-highlighter/org/apache/lucene/search/vectorhighlight/package-summary.html" rel="nofollow">有也是2.9.2中的贡献
That depends somehow on the version you are using. At least in Solr3.1 and later there is a way.
Actually i would suggest for this kind of highlighting term vectors with offsets and positions in matters of speed and performance and accuracy.
First of all you start off with enabling TermVectors and Positions + Offsets to accomplish proximity Highlighting on a certain field. The second thing you need is a Highlighting algorithm which works on TermVectors with Offsets. This algorithm is a new feature in Solr3.1 or via contributions available.
Parameters to adjust highlighting may be found here: http://wiki.apache.org/solr/HighlightingParameters
Especially the parameters: hl.highlightMultiTerm and hl.usePhraseHighlighter.
See this article for additional information about Term Vector Highlighting Article Reference
There is also a contribution in 2.9.2