You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you @kernelsoe! Such an API indeed makes sense. We can implement it at least slightly more efficiently than the remove & add combo, by reusing the same memory buffers under the hood. However, generally, remove is discouraged. As part of any operation or standalone.
@ashvardanian For my use case, I'm trying to load and add a few hundred user notes from sqlite into usearch on app startup without remove op then as the user edits 1 or reflecting multiple notes, I'm reindexing by removing and adding all with the same key again.
Doing this combined operation for multiple times in 1 function call would sometimes throw error, so I did something like below for now 😄:
Aside: There is a sqlite plugin sqlite-vss that adds vector search, but unfortunately uses FAISS Flat not HNSW. In addition, updates are not supported, so it seems the issue is elsewhere. I think pg-vector rolled their own.
While I wish this was inside sqlite, I am looking forward to using it side by side like you are.
@kernelsoe, thanks for the request, and @sroussey for weighing in! In 3.0, updating an entry becomes a batched removal followed by an insert, and #846 proposes that removal as an exclusive call that renumbers the survivors and re-links the graph around them, so I'm closing this in its favor.
Activity
ashvardanian commentedon Dec 24, 2023
Thank you @kernelsoe! Such an API indeed makes sense. We can implement it at least slightly more efficiently than the
remove&addcombo, by reusing the same memory buffers under the hood. However, generally,removeis discouraged. As part of any operation or standalone.How many vectors do you generally deal with?
kernelsoe commentedon Dec 25, 2023
@ashvardanian For my use case, I'm trying to load and add a few hundred user notes from sqlite into usearch on app startup without remove op then as the user edits 1 or reflecting multiple notes, I'm reindexing by removing and adding all with the same key again.
Doing this combined operation for multiple times in 1 function call would sometimes throw error, so I did something like below for now 😄:
May be I should use batch op?
sroussey commentedon Jan 4, 2024
Aside: There is a sqlite plugin sqlite-vss that adds vector search, but unfortunately uses FAISS Flat not HNSW. In addition, updates are not supported, so it seems the issue is elsewhere. I think pg-vector rolled their own.
While I wish this was inside sqlite, I am looking forward to using it side by side like you are.
ashvardanian commentedon Nov 14, 2026
@kernelsoe, thanks for the request, and @sroussey for weighing in! In 3.0, updating an entry becomes a batched removal followed by an insert, and #846 proposes that removal as an exclusive call that renumbers the survivors and re-links the graph around them, so I'm closing this in its favor.