Skip to content

Add filter-based deletion to Weaviate vector store #2150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

sobychacko
Copy link
Contributor

Implement filter-based deletion for WeaviateVectorStore by leveraging the existing ID-based deletion mechanism.

Key changes:

  • Add doDelete(Filter.Expression) implementation that delegates to the existing ID-based deletion method
  • Use similarity search with filter to find matching documents first
  • Delete matched documents by their IDs
  • Add integration tests for filter deletion scenarios:
    • Deleting by simple equality filter
    • Deleting by string-based filter expression

This maintains consistency with other vector store implementations while working around Weaviate's limitations in direct filtered deletion.

Implement filter-based deletion for WeaviateVectorStore by leveraging the
existing ID-based deletion mechanism.

Key changes:

- Add doDelete(Filter.Expression) implementation that delegates to the existing
  ID-based deletion method
- Use similarity search with filter to find matching documents first
- Delete matched documents by their IDs
- Add integration tests for filter deletion scenarios:
  * Deleting by simple equality filter
  * Deleting by string-based filter expression

This maintains consistency with other vector store implementations while
working around Weaviate's limitations in direct filtered deletion.
@sobychacko sobychacko added this to the 1.0.0-M6 milestone Jan 30, 2025
@markpollack markpollack merged commit 8162029 into spring-projects:main Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants