VectorStore
protocol VectorStore : NSObjectProtocolA protocol that defines the storage backend for semantic retriever.
-
Deletes the records matching the specified IDs.
Declaration
Swift
func delete(withIds ids: [String]) throws -
Deletes records matching the specified metadata filter.
Declaration
Swift
func delete(withMetadataFilter metadataFilter: [String : String]) throws -
Deletes all records from the vector store.
Declaration
Swift
func deleteAllRecords() throws -
Retrieves a single record matching the specified ID.
Declaration
Swift
func getRecord(withId recordId: String) throws -> RetrievalRecord -
Retrieves the records matching the specified IDs.
Declaration
Swift
func getRecordsWithIds(_ ids: [String]) throws -> [RetrievalRecord] -
Retrieves all unique top-level record identifiers in the vector store.
Declaration
Swift
func recordIdentifiers() throws -> [String] -
Searches the top-K nearest records to the query embedding.
Declaration
Swift
func search(withEmbedding queryEmbedding: [NSNumber], topK: Int) throws -> [RetrievalRecord] -
Searches the top-K nearest records to the query embedding with optional metadata filtering.
Declaration
Swift
func search(withEmbedding queryEmbedding: [NSNumber], topK: Int, metadataFilter: [String : String]?) throws -> [RetrievalRecord] -
Upserts a list of records in the vector store.
Declaration
Swift
func upsertRecords(_ records: [RetrievalRecord]) throws