Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Clean up after delete by query is done.

Kishore Nallana247a79a804d
diff --git a/include/core_api_utils.h b/include/core_api_utils.h
index ecbeee1a..b61142bc 100644
--- a/include/core_api_utils.h
+++ b/include/core_api_utils.h
@@ -9,6 +9,12 @@ struct deletion_state_t {
std::vector<std::pair<size_t, uint32_t*>> index_ids;
std::vector<size_t> offsets;
size_t num_removed;
+
+ ~deletion_state_t() {
+ for(auto& kv: index_ids) {
+ delete [] kv.second;
+ }
+ }
};
Option<bool> stateful_remove_docs(deletion_state_t* deletion_state, size_t batch_size, bool& done);
\ No newline at end of file