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 failing join tests.

Harpreet Sangar19be7b2d4943
diff --git a/src/index.cpp b/src/index.cpp
index 15ff0bd9..33d83c85 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1361,6 +1361,7 @@ void Index::search_all_candidates(const size_t num_search_fields,
id_buff, all_result_ids, all_result_ids_len);
query_hashes.insert(qhash);
+ filter_result_iterator->reset();
}
}
@@ -2570,7 +2571,6 @@ Option<bool> Index::search(std::vector<query_tokens_t>& field_query_tokens, cons
typo_tokens_threshold, exhaustive_search,
max_candidates, min_len_1typo, min_len_2typo, syn_orig_num_tokens, sort_order,
field_values, geopoint_indices);
- filter_result_iterator->reset();
// try split/joining tokens if no results are found
if(split_join_tokens == always || (all_result_ids_len == 0 && split_join_tokens == fallback)) {
@@ -2607,7 +2607,6 @@ Option<bool> Index::search(std::vector<query_tokens_t>& field_query_tokens, cons
all_result_ids, all_result_ids_len, group_limit, group_by_fields, prioritize_exact_match,
prioritize_token_position, query_hashes, token_order, prefixes, typo_tokens_threshold, exhaustive_search,
max_candidates, min_len_1typo, min_len_2typo, syn_orig_num_tokens, sort_order, field_values, geopoint_indices);
- filter_result_iterator->reset();
}
}
@@ -2680,7 +2679,6 @@ Option<bool> Index::search(std::vector<query_tokens_t>& field_query_tokens, cons
token_order, prefixes, typo_tokens_threshold,
exhaustive_search, max_candidates, min_len_1typo,
min_len_2typo, -1, sort_order, field_values, geopoint_indices);
- filter_result_iterator->reset();
} else {
break;