Sitecore 8.1 Update 2中的SwitchMasterToWeb.config缺少sitecore_list_index的补丁

时间:2016-04-11 20:26:25

标签: sitecore sitecore8

上周我从Sitecore 8.0 Update 5升级到Sitecore 8.1 Update 2.

我遇到了一个问题,其中Sitecore 8.1 Update 2附带的 SwitchMasterToWeb.config 示例似乎没有包含删除 sitecore_list_index 的补丁。这个补丁确实存在于Sitecore 8.1初始版本中

如果没有补丁,则抛出此错误(https://kb.sitecore.net/articles/347205)手动添加补丁会删除此错误。修补程序的删除是否是Sitecore的错误?或者我需要做些什么才能避免抛出这个错误?

我还注意到似乎没有要移除的补丁: sitecore_marketingdefinitions_master 我认为也应该使用 SwitchMasterToWeb.config 删除它。是否有理由没有修补对主索引的引用?

2 个答案:

答案 0 :(得分:2)

直到今天,我还没有能够使用开箱即用的SwitchMasterToWeb启动一个站点(没有错误)。它似乎总是会遗漏一些新引入的内容,或者是在子文件夹之后修补的内容或其他原因。

您很可能在SwitchMasterToWeb文件中发现了8.1 Update 2中的错误,并且应该使用Sitecore记录故障单以识别问题。与此同时,您需要部署自己的补丁来解决问题。如果您在票证中将其提供给Sitecore,则可以将其用于将来修复SwitchMasterToWeb。

支持部门也可能已经从其他客户端收到此问题,并且可能已经修补了SwitchMasterToWeb以供您使用。

答案 1 :(得分:2)

我同意Jay的观点,即SwitchMasterToWeb.config从未实现,但没有注意到一些问题。

您收到该错误的原因是因为没有“syncMaster”索引更新策略通常会与所有“主”数据库索引一起删除。这可能也已在SwitchMastertoWeb.config文件中删除。检查文件中是否存在 -

<indexUpdateStrategies>
   <syncMaster>
      <patch:delete />
   </syncMaster>
</indexUpdateStrategies>

删除'sitecore_list_index'也可能会导致一些问题。删除'sitecore_list_index'引起的问题可能是Sitecore将其从SwitchMasterToWeb.config文件中删除的原因。以下是删除“sitecore_list_index” - http://sitecoreunleashed.blogspot.com/2015/07/sitecore-8-update-3-cd-servers-and.html导致的问题。

为了解决上述问题,我们将'sitecore_list_index'的索引更新策略设置为'onPublishEndAsync'而不是删除它。

<index id="sitecore_list_index">
   <strategies>
      <strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" patch:instead="strategy[@ref='contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster']"/>
   </strategies>
   <locations>
      <crawler>
         <Database>web</Database>
      </crawler>
   </locations>
</index>

您甚至可以尝试将indexUpdateStrategy设置为'manual'而不是onPublishEndAsync,并检查日志中的问题。手动策略仅在您通过代码或Sitecore界面告知时构建索引。

要详细了解索引更新策略,请尝试此链接 - https://dev.sitecore.net/sitecore_experience_platform/setting_up__maintaining/search_and_indexing/indexing/index_update_strategies