diff --git a/src/Bonsai/Code/Services/Search/LuceneNetService.cs b/src/Bonsai/Code/Services/Search/LuceneNetService.cs index a88dc79..359099d 100644 --- a/src/Bonsai/Code/Services/Search/LuceneNetService.cs +++ b/src/Bonsai/Code/Services/Search/LuceneNetService.cs @@ -50,6 +50,9 @@ public Task InitializeAsync() /// public Task AddPageAsync(Page page) { + var query = new TermQuery(new Term("Id", page.Id.ToString())); + _writer.DeleteDocuments(query); + var luceneDoc = new LuceneDocument(page); _writer.AddDocument(luceneDoc.Fields); _writer.Commit();