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

Don't multiplex deletes by default.

Kishore Nallan305a9bc3484e
diff --git a/include/core_api_utils.h b/include/core_api_utils.h
index f4db135f..067c5ace 100644
--- a/include/core_api_utils.h
+++ b/include/core_api_utils.h
@@ -6,7 +6,7 @@
struct deletion_state_t {
Collection* collection;
- std::vector<std::pair<size_t, uint32_t*>> index_ids;
+ std::vector<std::pair<size_t, uint32_t*>> index_ids; // ids_len -> ids
std::vector<size_t> offsets;
size_t num_removed;
diff --git a/src/core_api.cpp b/src/core_api.cpp
index c7621fd9..c3bdbbd3 100644
--- a/src/core_api.cpp
+++ b/src/core_api.cpp
@@ -963,7 +963,7 @@ bool del_remove_documents(const std::shared_ptr<http_req>& req, const std::share
const char *FILTER_BY = "filter_by";
if(req->params.count(BATCH_SIZE) == 0) {
- req->params[BATCH_SIZE] = "40";
+ req->params[BATCH_SIZE] = "1000000000"; // 1 Billion
}
if(req->params.count(FILTER_BY) == 0) {
@@ -1026,6 +1026,8 @@ bool del_remove_documents(const std::shared_ptr<http_req>& req, const std::share
bool done = true;
Option<bool> remove_op = stateful_remove_docs(deletion_state, DELETE_BATCH_SIZE, done);
+ //LOG(INFO) << "Deletion batch size: " << DELETE_BATCH_SIZE << ", done: " << done;
+
if(!remove_op.ok()) {
res->set(remove_op.code(), remove_op.error());
req->last_chunk_aggregate = true;