Add Items to an Encrypted Index
Once you have created or loaded an encrypted index, you can add items to it. To do this, you can use the upsert()
function:
For more info on Array2D
in C++, see the API Reference.
Adding Items with Contents
It’s also possible to store item contents alongside vectors. To do this, simply add item
(which must be bytes) to the upsert()
call:
Understanding Conflicts & Updates
Since Cyborg Vector Search is end-to-end encrypted, it cannot manage conflicts and updates in the way that “traditional” Vector DBs do. Since index contents can’t be viewed server-side, conflicts are handled client-side. The way this works is simple: upsert
calls on the same ID will logically “overwrite” the ID, but not via a deletion. Rather, the original entry is kept but ignored in favor of the second one during query operations.
API Reference
For more information on adding items to an encrypted index, refer to the API reference:
Was this page helpful?