mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
making sure the ,Search matches Search - you might have 1 index then add another, but you dont want to reindex all your content if oyu havent selected it
This commit is contained in:
@@ -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(',', ' ');
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates new indexing tasks to update the index document for these content items
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user