Skip to content

Conversation

@sobychacko
Copy link
Contributor

Add the ability to delete documents from vector stores using filter expressions. This allows for more flexible document deletion based on metadata criteria rather than just document IDs.

Key changes:

  • Add delete(Filter.Expression) method to VectorStore interface
  • Implement filter-based deletion in ChromaVectorStore using where clauses
  • Implement filter-based deletion in ElasticsearchVectorStore using deleteByQuery
  • Implement filter-based deletion in PgVectorStore using jsonpath filters
  • Add integration tests for filter-based deletion across all implementations
  • Add default implementation in AbstractObservationVectorStore

This extends the VectorStore API to support more sophisticated document management capabilities while maintaining consistent behavior across different backend implementations.

Add string-based filter deletion alongside the Filter.Expression-based deletion
for vector stores. This provides a more convenient API for simple filter cases
while maintaining the full flexibility of expression-based filtering.

Key changes:
- Add delete(Filter.Expression) and delete(String) methods to VectorStore
- Add default string filter implementation in VectorStore interface
- Implement filter deletion in Chroma/Elasticsearch/PgVector stores
- Add integration tests for both filter APIs across implementations

This extends vector store deletion capabilities while maintaining consistent
behavior across implementations.
@markpollack markpollack changed the title Add filter-based deletion to VectorStore implementations Add filter-based deletion to VectorStore implementations, Chroma, Elastic, PGVector Jan 28, 2025
@markpollack markpollack added this to the 1.0.0-M6 milestone Jan 28, 2025
@markpollack markpollack self-assigned this Jan 28, 2025
@markpollack
Copy link
Member

merged in f588716

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants