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

SwitchMasterToWeb.config in Sitecore 8.1 Update 2 missing patch for sitecore_list_index

上周我从 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。是否存在未修补对主索引的引用的原因?

直到今天,我还无法使用开箱即用的 SwitchMasterToWeb 启动网站(没有错误)。它似乎总是遗漏一些新引入的东西,或者在之后修补的子文件夹中,或者其他一些原因。

您很可能已经在 8.1 Update 2 的 SwitchMasterToWeb 文件中发现了一个错误,应该使用 Sitecore 记录一个识别该问题的票证。同时,您需要部署自己的补丁来解决问题。如果您在票证中向 Sitecore 提供此信息,他们便可以将其用于未来对 SwitchMasterToWeb 的修复。

也有可能支持人员已经从另一个客户端收到了这个问题,并且可能有一个修补过的 SwitchMasterToWeb 来提供给您使用。

我同意 Jay 的观点,SwitchMasterToWeb.config 从来没有在没有注意到一些问题的情况下实施。

出现该错误的原因是没有 'syncMaster' 索引更新策略通常会与所有 'master' 数据库索引一起删除。 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 界面告诉它时才构建索引。

要了解有关索引更新策略的更多信息,请尝试此 link - https://dev.sitecore.net/sitecore_experience_platform/setting_up__maintaining/search_and_indexing/indexing/index_update_strategies