Sitecore - Indexing data from presentation components with non-context datasources

家住魔仙堡 提交于 2019-12-18 13:31:41

问题


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

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.


回答1:


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

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" />


来源:https://stackoverflow.com/questions/17132504/sitecore-indexing-data-from-presentation-components-with-non-context-datasourc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!