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

Fix tests.

kishorenc6377d1b58c8f
diff --git a/src/collection.cpp b/src/collection.cpp
index 2c12f690..3e5a031e 100644
--- a/src/collection.cpp
+++ b/src/collection.cpp
@@ -394,7 +394,7 @@ Option<nlohmann::json> Collection::search(const std::string & query, const std::
return Option<nlohmann::json>(400, "No search fields specified for the query.");
}
- if(group_limit == 0 || group_limit >= 100) {
+ if(!group_by_fields.empty() && (group_limit == 0 || group_limit >= 100)) {
return Option<nlohmann::json>(400, "Value of `group_limit` is invalid.");
}