In some circumstances, it would be desirable that when you ask for k nearest neighbors from the index and fewer than k are found, that however many are found are returned and the RecallError at the line below (and a similar one later in the file) would be suppressed.
|
if (result.size() != (unsigned long)k) { |
|
throw RecallError( |
|
"Fewer than expected results were retrieved; only found " + |
|
std::to_string(result.size()) + " of " + std::to_string(k) + |
|
" requested neighbors. Reconstruct the index with a higher M " |
|
"value to increase recall."); |
|
} |
It could be flag in either the index construction or the query args.
In some circumstances, it would be desirable that when you ask for k nearest neighbors from the index and fewer than k are found, that however many are found are returned and the RecallError at the line below (and a similar one later in the file) would be suppressed.
voyager/cpp/src/TypedIndex.h
Lines 576 to 582 in 8e72439
It could be flag in either the index construction or the query args.