From 19be7b2d49438d472fdf67c6c53fe8cce726471d Mon Sep 17 00:00:00 2001 From: Harpreet Sangar Date: Mon, 8 May 2023 10:28:36 +0530 Subject: [PATCH] Fix failing join tests. --- src/index.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 Index::search(std::vector& 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 Index::search(std::vector& 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 Index::search(std::vector& 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;