Sitecore 7突出显示搜索结果 [英] Sitecore 7 highlight search results

查看:111
本文介绍了Sitecore 7突出显示搜索结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将项目从Sitecore 6.2升级到Sitecore 7.

I am working on the upgrade of a project from Sitecore 6.2 to Sitecore 7.

我发现在Sitecore 6.2中,搜索结果的突出显示是通过sitecore.client dll中的Lucene.Net.Search.Highlight.Highlighter,QueryScorer和Formatter类实现的.

I have found out that in Sitecore 6.2, the highlighting of the search results are implemented with the Lucene.Net.Search.Highlight.Highlighter, QueryScorer and Formatter classes in sitecore.client dll.

Sitecore 7提供哪些类和/或功能来突出显示搜索结果?我在网上搜索,但找不到所需的信息/示例.

Which classes and/or functions does Sitecore 7 provide to do highlighting in search results? I searched the web but I could not find the required information/examples.

推荐答案

Sitecore 7当前不支持OOTB突出显示结果(将在更高版本中提供).问题在于,我们使用DocumentMapper将结果映射回对象,因此您无法像原始版本那样对"Document"对象进行原始访问.

Highlighting of results is not supported currently OOTB with Sitecore 7 (it will be coming in a later version). The issue is that we map the results back to objects using the DocumentMapper so you do not have raw access to the 'Document' objects like the older versions.

现在,如果您想深入了解Lucene并自己获得结果,则可以在Lucene.net contrib库中找到突出显示"功能.

For now, if you want to dig into Lucene and get the results yourself you can find the Highlighting functionality inside the Lucene.net contrib library.

如果您确实使用了此功能,则这里有一篇关于Lucene DLL版本的有用的博客文章,您应该知道:

If you do use this there is a useful blog post here regarding Lucene DLL versions that you should be aware of:

http://laubplusco.net/sitecore-7-lucen -3-0-highlighted-results/

这篇关于Sitecore 7突出显示搜索结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆