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

Ignore errors during analytics json serialization.

Kishore Nallanff6e0e43c851
diff --git a/src/query_analytics.cpp b/src/query_analytics.cpp
index efd78964..0bcc427e 100644
--- a/src/query_analytics.cpp
+++ b/src/query_analytics.cpp
@@ -60,7 +60,7 @@ void QueryAnalytics::serialize_as_docs(std::string& docs) {
doc["id"] = std::to_string(StringUtils::hash_wy(key_buffer.c_str(), key_buffer.size()));
doc["q"] = key_buffer;
doc["$operations"]["increment"]["count"] = it.value();
- docs += doc.dump() + "\n";
+ docs += doc.dump(-1, ' ', false, nlohmann::detail::error_handler_t::ignore) + "\n";
}
if(!docs.empty()) {