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

limit groups by per page limit (#1735)

Krunal Gandhi468f071be23d
diff --git a/src/index.cpp b/src/index.cpp
index 3552c4d8..3b2b4521 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2883,6 +2883,10 @@ Option<bool> Index::search(std::vector<query_tokens_t>& field_query_tokens, cons
if(excluded_group_ids.count(distinct_id) != 0) {
continue;
}
+
+ if(groups_processed.size() == fetch_size) {
+ break;
+ }
}
int64_t scores[3] = {0};