Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support in-place update #225

Open
ShawnShawnYou opened this issue Dec 17, 2024 · 0 comments · May be fixed by #308
Open

Support in-place update #225

ShawnShawnYou opened this issue Dec 17, 2024 · 0 comments · May be fixed by #308
Assignees
Labels
kind/feature New feature or request version/0.13

Comments

@ShawnShawnYou
Copy link
Collaborator

ShawnShawnYou commented Dec 17, 2024

Is your feature request related to a problem? Please describe.
In some cases, the user may want to update the base vector. For example, each base vector corresponds to a face of a person. Implementing this functionality using the existing external interface requires the use of Delete + Insert, which can significantly degrade the recall performance of the original index. However, for vectors that are extremely similar before and after the update, it is straightforward to reuse the connections in the graph before the update.

Describe the solution you'd like
In such cases, VSAG should provide an interface to support in-place updates for IDs and vectors without modifying any connections in the graph index, like:
Update(int64_t old_id, int64_t new_id, const DatasetPtr& new_base)

Then, we should add --force argument, if force_update == true, we update the vector without any check. Otherwise, we first search the ANNs / or get the neighbors in graph of the old_id and vector. Then we should check the distance relationship between new_vec and the ANNs and old_vec. If the distance relationship changes, return false.

Last, the conjugate graph should be modified to allow label update.

Additional context
#196
#308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request version/0.13
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants