Sitecore-使用非上下文数据源索引来自演示组件的数据 [英] Sitecore - Indexing data from presentation components with non-context datasources

查看:60
本文介绍了Sitecore-使用非上下文数据源索引来自演示组件的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Sitecore网站,其中许多页面主要是由指向内容树中其他位置的数据源的各种子布局组装而成的.

I have a Sitecore site where many of the pages are assembled mainly from various sublayouts pointing at datasources elsewhere in the content tree.

这是问题的基本示例.有人浏览有关苹果的页面时,可能会多次看到苹果"一词.但是,Lucene不会为该单词在Apple页面项目中建立索引,因为它存储在其他项目中.

Here's a basic example of the problem. Someone viewing a page about apples might see the word 'apple' 10 times. However, Lucene will not index the Apple page item for that word because it's stored in other items.

我确定这肯定是一个常见问题,但似乎找不到任何建议.

I'm sure this must be a common issue but I can't seem to find any advice on it.

推荐答案

这是一个普遍的问题,在此屏幕录像的38:29处有一个解决方案:

This is a common issue and there's a solution in this screencast at 38:29:

http://www.techphoria414.com/Blog/2012/May/Sitecore_Page_Editor_Unleashed

获取页面上的示例代码,然后查看类PageEditor.Unleashed.Search.DynamicFields.VisualizationField,该类可获取所有数据源并将其内容添加到配置中的"_content"字段中

Grab the sample code on the page and look at the class PageEditor.Unleashed.Search.DynamicFields.VisualizationField which grabs all data sources and adds their content to the "_content" field in the config

<dynamicField type="PageEditor.Unleashed.Search.DynamicFields.VisualizationField, PageEditor.Unleashed.Classes" name="_content" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />

这篇关于Sitecore-使用非上下文数据源索引来自演示组件的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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