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

Expose match score in search results.

kishorenceb70e433d8d9
diff --git a/src/collection.cpp b/src/collection.cpp
index 6c764788..1041d2f3 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -683,7 +683,7 @@ Option<nlohmann::json> Collection::search(std::string query, const std::vector<s
prune_document(document, include_fields, exclude_fields);
wrapper_doc["document"] = document;
- //wrapper_doc["match_score"] = field_order_kv.match_score;
+ wrapper_doc["match_score"] = field_order_kv.match_score;
//wrapper_doc["seq_id"] = (uint32_t) field_order_kv.key;
result["hits"].push_back(wrapper_doc);