Skip to main content

Module ffi_sparse

Module ffi_sparse 

Source
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

CodeConstantMeaning
1SVS_SUCCESSOperation succeeded
0SVS_ERR_GENERICGeneric error
-1SVS_ERR_NULL_PTRNull pointer argument
-2SVS_ERR_INVALID_UTF8Invalid UTF-8 string
-3SVS_ERR_NOT_FOUNDStore or key not found
-4SVS_ERR_ALREADY_EXISTSStore already exists
-100SVS_ERR_INTERNALInternal 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.