diff --git a/src/Orchard.Web/Modules/Orchard.Indexing/Settings/EditorEvents.cs b/src/Orchard.Web/Modules/Orchard.Indexing/Settings/EditorEvents.cs index cb3567cef..9fbf042a3 100644 --- a/src/Orchard.Web/Modules/Orchard.Indexing/Settings/EditorEvents.cs +++ b/src/Orchard.Web/Modules/Orchard.Indexing/Settings/EditorEvents.cs @@ -34,7 +34,7 @@ namespace Orchard.Indexing.Settings { builder.WithSetting("TypeIndexing.Indexes", model.Indexes); // create indexing tasks only if settings have changed - if (model.Indexes != previous.Indexes) { + if (Clean(model.Indexes) != Clean(previous.Indexes)) { // if a an index is added, all existing content items need to be re-indexed CreateIndexingTasks(); @@ -43,6 +43,13 @@ namespace Orchard.Indexing.Settings { yield return DefinitionTemplate(model); } + private string Clean(string value) { + if (string.IsNullOrEmpty(value)) + return value; + + return value.Trim(',', ' '); + } + /// /// Creates new indexing tasks to update the index document for these content items ///