Dynamic index modification methods behavior should be changed as follow:
add_points() should allow to override existing vectors (vectors with same labels) and return the number of new vectors only.
delete_points() should accept non-existing external ids and return the number of vectors which are actually deleted.
|
size_t add_points( |
|
svs::data::ConstSimpleDataView<float> new_points, std::span<const size_t> ids |
|
) override { |
|
auto old_size = index.size(); |
|
index.add_points(new_points, ids); |
|
// TODO: This is a bit of a hack - we should ideally return the number of points |
|
// actually added, but for now we can just return index size change. |
|
return index.size() - old_size; |
|
} |
|
|
|
size_t delete_points(std::span<const size_t> ids) override { |
|
auto old_size = index.size(); |
|
index.delete_points(ids); |
|
// TODO: This is a bit of a hack - we should ideally return the number of points |
|
// actually deleted, but for now we can just return index size change. |
|
return old_size - index.size(); |
|
} |
Dynamic index modification methods behavior should be changed as follow:
add_points()should allow to override existing vectors (vectors with same labels) and return the number of new vectors only.delete_points()should accept non-existing external ids and return the number of vectors which are actually deleted.ScalableVectorSearch/bindings/c/src/index.hpp
Lines 135 to 151 in ec4260c