diff --git a/src/Kentico.Xperience.AlgoliaSearch.csproj b/src/Kentico.Xperience.AlgoliaSearch.csproj index ca6aa93..870236f 100644 --- a/src/Kentico.Xperience.AlgoliaSearch.csproj +++ b/src/Kentico.Xperience.AlgoliaSearch.csproj @@ -38,7 +38,7 @@ - + diff --git a/src/Services/Implementations/DefaultAlgoliaClient.cs b/src/Services/Implementations/DefaultAlgoliaClient.cs index 2c4187a..ee37340 100644 --- a/src/Services/Implementations/DefaultAlgoliaClient.cs +++ b/src/Services/Implementations/DefaultAlgoliaClient.cs @@ -181,7 +181,8 @@ public void Rebuild(string indexName) var dataToUpsert = new List(); indexedNodes.ForEach(node => dataToUpsert.AddRange(GetDataToUpsert(new AlgoliaQueueItem(node, AlgoliaTaskType.CREATE, algoliaIndex.IndexName)))); var searchIndex = algoliaIndexService.InitializeIndex(algoliaIndex.IndexName); - searchIndex.ReplaceAllObjects(dataToUpsert); + searchIndex.ClearObjects(); + searchIndex.SaveObjects(dataToUpsert); } diff --git a/tests/Kentico.Xperience.AlgoliaSearch.Tests.csproj b/tests/Kentico.Xperience.AlgoliaSearch.Tests.csproj index 6e41408..018e539 100644 --- a/tests/Kentico.Xperience.AlgoliaSearch.Tests.csproj +++ b/tests/Kentico.Xperience.AlgoliaSearch.Tests.csproj @@ -9,7 +9,7 @@ - +