From 8dc02fa0814114277d9930396b1fc978d0d7dfef Mon Sep 17 00:00:00 2001 From: Elitsa Date: Mon, 8 Jul 2024 09:30:12 +0300 Subject: [PATCH] Revert "Making sure base.OnTransformingIndexValues(e); is called for DeliveryApiContentIndex without the special index value transformations" This reverts commit a7ff32891ed87bb724fa02d41232ffcec474e499. --- .../UmbracoExamineIndex.cs | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs b/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs index fb162b6521..5faccf581f 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs @@ -115,32 +115,16 @@ public abstract class UmbracoExamineIndex : LuceneIndex, IUmbracoIndex, IIndexDi { base.OnTransformingIndexValues(e); - // Performs special value transformations to all deriving indexes of this base class - // but the DeliveryApiContentIndex (they are not needed in this case). - // The alternative is to move the call to ApplySpecialIndexValueTransformations into a new base class - // that all implementors but the DeliveryApiContentIndex would inherit from but that would be breaking - // for any custom indexes deriving from UmbracoExamineIndex. - if (e.Index.Name != Constants.UmbracoIndexes.DeliveryApiContentIndexName) - { - ApplySpecialIndexValueTransformations(e); - } - } - - /// - /// Updates the index ValueSet with a special __Path and __Icon fields. - /// - private void ApplySpecialIndexValueTransformations(IndexingItemEventArgs e) - { var updatedValues = e.ValueSet.Values.ToDictionary(x => x.Key, x => (IEnumerable)x.Value); - // Ensure special __Path field + //ensure special __Path field var path = e.ValueSet.GetValue("path"); if (path != null) { updatedValues[UmbracoExamineFieldNames.IndexPathFieldName] = path.Yield(); } - // Ensure special __Icon field + //icon if (e.ValueSet.Values.TryGetValue("icon", out IReadOnlyList? icon) && e.ValueSet.Values.ContainsKey(UmbracoExamineFieldNames.IconFieldName) == false) {