public final class
InMemoryVectorStore
In-memory VectorStore implementation backed by a SQLite :memory: database.
Public Constructors
|
InMemoryVectorStore(int embeddingDimension)
Creates an in-memory vector store with the specified embedding dimension.
|
Public Methods
| void | |
| List<RetrievalRecord> | |
| void | |
| void |
deleteByMetadata(Map<String, String> metadataFilter)
Deletes records matching the specified metadata filter.
|
| void |
deleteAllRecords()
Deletes all records from the in-memory store.
|
| List<String> |
getAllRecordIds()
Returns all unique top-level record identifiers.
|
| void |
close()
Closes the in-memory vector store.
|
Inherited Methods
Public Constructors
public InMemoryVectorStore (int embeddingDimension)
Creates an in-memory vector store with the specified embedding dimension.
Public Methods
public void upsertRecords (List<RetrievalRecord> records)
Inserts or updates a list of records in memory.
public List<RetrievalRecord> search (float[] queryEmbedding, int topK, Map<String, String> metadataFilter)
Searches the top-K nearest records in memory.
public void deleteByMetadata (Map<String, String> metadataFilter)
Deletes records matching the specified metadata filter.
public void deleteAllRecords ()
Deletes all records from the in-memory store.
public void close ()
Closes the in-memory vector store.