Expand description
FFI Layer for Sparse Vector Store
C-ABI interface for the Sparse Vector Store, enabling use from Python, C++, and other FFI-capable languages.
§Error Codes
| Code | Constant | Meaning |
|---|---|---|
| 1 | SVS_SUCCESS | Operation succeeded |
| 0 | SVS_ERR_GENERIC | Generic error |
| -1 | SVS_ERR_NULL_PTR | Null pointer argument |
| -2 | SVS_ERR_INVALID_UTF8 | Invalid UTF-8 string |
| -3 | SVS_ERR_NOT_FOUND | Store or key not found |
| -4 | SVS_ERR_ALREADY_EXISTS | Store already exists |
| -100 | SVS_ERR_INTERNAL | Internal panic |
Constants§
- SVS_
ERR_ ALREADY_ EXISTS - SVS_
ERR_ GENERIC - SVS_
ERR_ INTERNAL - SVS_
ERR_ INVALID_ UTF8 - SVS_
ERR_ NOT_ FOUND - SVS_
ERR_ NULL_ PTR - SVS_
SUCCESS
Functions§
- svs_
close - Close and remove a sparse vector store from the registry.
- svs_
delete - Delete a document by key.
- svs_
exists - Check if a store exists in the registry.
- svs_
free_ key - Free a key string returned by svs_search.
- svs_
index - Index a sparse vector with a key.
- svs_len
- Get the number of documents in the store.
- svs_new
- Create a new sparse vector store.
- svs_
open - Open an existing index from a file.
- svs_
save - Save the index to a file.
- svs_
search - Search for similar documents.
- svs_
stats - Get index statistics.