diff --git a/src/index.cpp b/src/index.cpp index 030238281..f18b9966f 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -2509,7 +2509,10 @@ std::pair Index::_search_with_filters(const for (const auto &raw_label : raw_labels) { auto converted_label = this->get_converted_label(raw_label); - converted_labels.push_back(converted_label); + if (converted_label != std::numeric_limits::max()) + { + converted_labels.push_back(converted_label); + } } if (typeid(uint64_t *) == indices.type())