mirror of
https://github.com/typesense/typesense.git
synced 2025-05-20 21:52:23 +08:00
Ignore errors during analytics json serialization.
This commit is contained in:
parent
c6b25a7964
commit
ff6e0e43c8
@ -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()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user