A vector store implementation using Android system-level AppSearch storage.
Public Constructors
Public Methods
| void |
close()
|
| void | |
| void | |
| void |
deleteAll()
Deletes all records from the vector store.
|
| List<RetrievalRecord> | |
| List<String> |
getAllRecordIds()
Retrieves all unique record identifiers in the vector store.
|
| List<RetrievalRecord> |
search(float[] queryEmbedding, int topK)
Searches the top-K nearest records to the query embedding.
|
| List<RetrievalRecord> | |
| void |
Inherited Methods
Public Constructors
Public Methods
public void delete (Map<String, String> metadataFilter)
Deletes the records matching the specified metadata filter.
Parameters
| metadataFilter |
|---|
public void delete (List<String> ids)
Deletes the records matching the specified IDs.
Parameters
| ids |
|---|
public void deleteAll ()
Deletes all records from the vector store.
public List<RetrievalRecord> get (List<String> ids)
Retrieves the records matching the specified IDs (Key-Value lookup).
Parameters
| ids |
|---|
public List<RetrievalRecord> search (float[] queryEmbedding, int topK)
Searches the top-K nearest records to the query embedding.
Parameters
| queryEmbedding | |
|---|---|
| topK |
public List<RetrievalRecord> search (float[] queryEmbedding, int topK, Map<String, String> metadataFilter)
Searches the top-K nearest records matching the query embedding and metadata filter.
Parameters
| queryEmbedding | |
|---|---|
| topK | |
| metadataFilter |
public void upsert (List<RetrievalRecord> records)
Upserts a list of records in the vector store.
Parameters
| records |
|---|