Skip to content

Commit f78f289

Browse files
committed
Fix entry point missing
1 parent 764be36 commit f78f289

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/index.cpp

+14-2
Original file line numberDiff line numberDiff line change
@@ -2439,8 +2439,8 @@ size_t Index<T, TagT, LabelT>::search_with_tags(const T *query, const uint64_t K
24392439

24402440
std::shared_lock<std::shared_timed_mutex> ul(_update_lock);
24412441

2442-
const std::vector<uint32_t> init_ids = get_init_ids();
2443-
2442+
std::vector<uint32_t> init_ids = get_init_ids();
2443+
24442444
//_distance->preprocess_query(query, _data_store->get_dims(),
24452445
// scratch->aligned_query());
24462446
_data_store->preprocess_query(query, scratch);
@@ -2453,6 +2453,18 @@ size_t Index<T, TagT, LabelT>::search_with_tags(const T *query, const uint64_t K
24532453
{
24542454
std::vector<LabelT> filter_vec;
24552455
auto converted_label = this->get_converted_label(filter_label);
2456+
2457+
if (_label_to_start_id.find(converted_label) != _label_to_start_id.end())
2458+
{
2459+
init_ids.emplace_back(_label_to_start_id[converted_label]);
2460+
}
2461+
else
2462+
{
2463+
diskann::cout << "No filtered medoid found. exitting "
2464+
<< std::endl; // RKNOTE: If universal label found start there
2465+
throw diskann::ANNException("No filtered medoid found. exitting ", -1);
2466+
}
2467+
24562468
filter_vec.push_back(converted_label);
24572469
iterate_to_fixed_point(scratch, L, init_ids, true, filter_vec, true);
24582470
}

0 commit comments

Comments
 (0)