Skip to content

Commit

Permalink
Fixes #233
Browse files Browse the repository at this point in the history
  • Loading branch information
skamphuis committed May 15, 2024
1 parent 202fe8d commit 50063a4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions OpenContent/Components/FeatureController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,17 +185,9 @@ public override IList<SearchDocument> 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);
Expand Down

0 comments on commit 50063a4

Please sign in to comment.