「indexing.getDependencies」パイプラインの既知の問題


説明

複数の関連コンテンツ アイテムを個々のLuceneドキュメントに結合するようにSitecoreコンテンツ検索を構成する場合、「indexing.getDependencies」パイプラインを使用できます。

「indexing.getDependencies」パイプラインを構成する場合、本記事で説明されている、様々な既知の問題が発生する可能性があります。

パイプラインの使用方法の詳細は、SDNのSitecore Search and Indexing Guideをご参照ください。

問題#1 (XPバージョン8.1 Update-3にて修正されました)

GetDatasourceDependencies」プロセッサがアイテムのプレゼンテーション設定からデータソースをフェッチする際に、ログ ファイルに次の例外が記録される場合があります。

Exception: System.InvalidCastException
Message: Unable to cast object of type 'Sitecore.Data.ItemUri' to type 'Sitecore.ContentSearch.IIndexableUniqueId'.
Source: System.Core
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Sitecore.ContentSearch.Pipelines.GetDependencies.GetDatasourceDependencies.Process(GetDependenciesArgs context)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.ContentSearch.Abstractions.CorePipelineWrapper.Run(String pipelineName, PipelineArgs args)
   at Sitecore.ContentSearch.Pipelines.GetDependencies.GetDependenciesPipeline.GetIndexingDependencies(IIndexable indexable)
   at Sitecore.ContentSearch.Crawler`1.UpdateDependents(IProviderUpdateContext context, T indexable)
   at Sitecore.ContentSearch.SitecoreItemCrawler.DoUpdate(IProviderUpdateContext context, SitecoreIndexableItem indexable)
   at Sitecore.ContentSearch.Crawler`1.Update(IProviderUpdateContext context, IIndexableUniqueId indexableUniqueId, IndexingOptions indexingOptions)
   at Sitecore.ContentSearch.AbstractSearchIndex.PerformUpdate(IEnumerable`1 indexableInfo, IndexingOptions indexingOptions)
   at Sitecore.ContentSearch.AbstractSearchIndex.Update(IEnumerable`1 indexableInfo)

解決策:

本問題を解決するには、次のパッチを適用します。

  1. Sitecore.Support.408894.dll」ファイルを「/bin」フォルダーに配置します。
  2. Sitecore.Support.408894.config」ファイルを「/App_config/Include」フォルダーに配置します。

問題#2 (XPバージョン8.1 Update-3にて修正されました)

GetDatasourceDependencies」プロセッサを有効にする際に、「System.StackOverflowException」例外が発生し、Webアプリケーション プールの予定外のリサイクルが発生する可能性もあります。

本問題は、アイテムのプレゼンテーション設定に循環データ ソース依存関係がある場合に発生します。

循環依存の例としては、ItemAがプレゼンテーションのデータ ソースとしてItemBを使用し、ItemBがプレゼンテーションの詳細でItemAを参照するといった場合が挙げられます。

解決策

本問題を解決するには、次のパッチを適用します。

  1. Sitecore.Support.408898.dll」ファイルを「/bin」フォルダーに配置します。
  2. Sitecore.Support.408898.config」ファイルを「/App_config/Include」フォルダーに配置します。

問題#3

アイテムの依存関係の1つが削除されると、ソース アイテムのインデックスが更新されず、「indexing.GetDependencies」パイプラインが実行されない可能性があります。

解決策

indexing.GetDependencies」パイプラインを使用する代わりに、アイテムがインデックスから削除された際に実行されるカスタム イベント ハンドラーにカスタム ロジックを移動させます。