Skip to content

Commit

Permalink
Fix/remove old generations on rebuild (#92)
Browse files Browse the repository at this point in the history
* update(DancingGoat): template.zip

* fix(rebuild): remove old lucene generations from file system on rebuild

---------

Co-authored-by: Boris Kapustík <kapustik@nittin.cz>
  • Loading branch information
bkapustik and Boris Kapustík authored Feb 24, 2025
1 parent b37e04b commit 9dfc042
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kentico.Xperience.Lucene.Core/Indexing/LuceneIndex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ internal LuceneIndex(LuceneIndexModel indexConfiguration, Dictionary<string, Typ
LuceneIndexingStrategyType = strategy;

string indexStoragePath = Path.Combine(Environment.CurrentDirectory, "App_Data", "LuceneSearch", indexConfiguration.IndexName);
StorageContext = new IndexStorageContext(new GenerationStorageStrategy(), indexStoragePath, new IndexRetentionPolicy(4));
StorageContext = new IndexStorageContext(new GenerationStorageStrategy(), indexStoragePath, new IndexRetentionPolicy(0));
}
}

0 comments on commit 9dfc042

Please # to comment.