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

Document PUT should only support strict update.

Kishore Nallana6dae42c1f34
diff --git a/src/core_api.cpp b/src/core_api.cpp
index c5a615cc..a715cf44 100644
--- a/src/core_api.cpp
+++ b/src/core_api.cpp
@@ -776,7 +776,7 @@ bool put_upsert_document(http_req & req, http_res & res) {
return false;
}
- Option<nlohmann::json> upserted_doc_op = collection->add(req.body, true, doc_id);
+ Option<nlohmann::json> upserted_doc_op = collection->add(req.body, false, doc_id);
if(!upserted_doc_op.ok()) {
res.set(upserted_doc_op.code(), upserted_doc_op.error());