diff --git a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs index 8587076..a10ef10 100644 --- a/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs +++ b/src/Sitecore.Support.96931/ContentSearch/LuceneProvider/LuceneDocumentBuilder.cs @@ -23,15 +23,19 @@ public LuceneDocumentBuilder(IIndexable indexable, IProviderUpdateContext contex protected override void AddComputedIndexFieldsInParallel() { ConcurrentQueue exceptions = new ConcurrentQueue(); + var needEnterLanguageFallbackItemSwitcher = LanguageFallbackItemSwitcher.CurrentValue; Parallel.ForEach(base.Options.ComputedIndexFields, base.ParallelOptions, delegate (IComputedIndexField computedIndexField, ParallelLoopState parallelLoopState) { object fieldValue; try { - using (new LanguageFallbackFieldSwitcher(this.Index.EnableFieldLanguageFallback)) + using (new LanguageFallbackItemSwitcher(needEnterLanguageFallbackItemSwitcher)) { - fieldValue = computedIndexField.ComputeFieldValue(this.Indexable); - } + using (new LanguageFallbackFieldSwitcher(this.Index.EnableFieldLanguageFallback)) + { + fieldValue = computedIndexField.ComputeFieldValue(this.Indexable); + } + } } catch (Exception ex) {