From e33b2a419123daa66ea4dd1130d6febe2fe0b784 Mon Sep 17 00:00:00 2001 From: Harpreet Sangar Date: Mon, 10 Apr 2023 19:13:45 +0530 Subject: [PATCH] Fix `FacetFieldStringFiltering` test. --- src/index.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/index.cpp b/src/index.cpp index b746dbb6..b59a5d27 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -4986,6 +4986,12 @@ void Index::search_wildcard(filter_node_t const* const& filter_tree_root, filter_result_iterator.next(); } while (batch_result_ids.size() < window_size && filter_result_iterator.valid()); + uint32_t* new_all_result_ids = nullptr; + all_result_ids_len = ArrayUtils::or_scalar(all_result_ids, all_result_ids_len, batch_result_ids.data(), + batch_result_ids.size(), &new_all_result_ids); + delete [] all_result_ids; + all_result_ids = new_all_result_ids; + num_queued++; searched_queries.push_back({}); @@ -5066,14 +5072,6 @@ void Index::search_wildcard(filter_node_t const* const& filter_tree_root, /*long long int timeMillisF = std::chrono::duration_cast( std::chrono::high_resolution_clock::now() - beginF).count(); LOG(INFO) << "Time for raw scoring: " << timeMillisF;*/ - -// TODO: OR filter ids with all_results_ids -// -// uint32_t* new_all_result_ids = nullptr; -// all_result_ids_len = ArrayUtils::or_scalar(all_result_ids, all_result_ids_len, filter_ids, -// filter_ids_length, &new_all_result_ids); -// delete [] all_result_ids; -// all_result_ids = new_all_result_ids; } void Index::populate_sort_mapping(int* sort_order, std::vector& geopoint_indices,