From 50063a4df8ba5799b555d4224bd4b3f3fa58895d Mon Sep 17 00:00:00 2001 From: Stefan Kamphuis Date: Wed, 15 May 2024 10:35:51 +0200 Subject: [PATCH] Fixes #233 --- OpenContent/Components/FeatureController.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/OpenContent/Components/FeatureController.cs b/OpenContent/Components/FeatureController.cs index cde2d5d9..608c72e7 100644 --- a/OpenContent/Components/FeatureController.cs +++ b/OpenContent/Components/FeatureController.cs @@ -185,17 +185,9 @@ public override IList GetModifiedSearchDocuments(ModuleInfo modI if (DnnLanguageUtils.IsMultiLingualPortal(modInfo.PortalID)) { - if (string.IsNullOrEmpty(modInfo.CultureCode)) - { - // it's a neutral language module according to DNN, which means we will need to add the neutral language content too - var culture = ps.DefaultLanguage; - var localizedData = GetLocalizedContent(content.Data, culture, modInfo); - // pass "" as culture to indicate we're indexing the neutral language here - searchDoc = CreateSearchDocument(ps, modInfo, module.Settings, localizedData, content.Id, "", content.Title, content.LastModifiedOnDate.ToUniversalTime()); - searchDocuments.Add(searchDoc); - App.Services.Logger.Trace($"Indexing content {modInfo.ModuleID}|{culture} - OK! {searchDoc.Title} ({modInfo.TabID}) of {content.LastModifiedOnDate.ToUniversalTime()}"); - } - // now start creating the docs for specific cultures + // start creating the docs for specific cultures + // we don't add a search docuement with the neutral language anymore, + // because that results in duplicate documents in search results foreach (var portalLocale in portalLocales.Keys) { var localizedData = GetLocalizedContent(content.Data, portalLocale, modInfo);