Add documents to the vector store
Documents to add (embeddings will be generated if not provided)
Number of documents added
Search for similar documents
Search query
Matching documents with similarity scores
Get a document by ID
Document ID
The document or null if not found
Update a document
Document ID
Updated document
true if updated, false if not found
Delete a document
Document ID
true if deleted, false if not found
Delete multiple documents matching a filter
Metadata filter
Number of documents deleted
Get total number of documents
Document count
Clear all documents
List all documents (optionally filtered)
Optionalfilter: MetadataFilterOptional metadata filter
All matching documents
Interface for vector store implementations.
Vector stores persist documents with their embeddings and enable semantic similarity search.
Example