Skip to content

Extract VectorStoreRetriever interface from VectorStore #3827

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
merged 1 commit into from
Jul 17, 2025

Conversation

markpollack
Copy link
Member

  • Created new VectorStoreRetriever functional interface for read-only operations
  • Modified VectorStore to extend VectorStoreRetriever
  • Removed duplicate similaritySearch methods from VectorStore
  • Updated API documentation to reflect the interface separation
  • Added package-info.java documentation for clarity

This change follows the principle of least privilege by providing a read-only interface for retrieval operations while maintaining the full functionality in VectorStore.

Fixes #1290

Thank you for taking time to contribute this pull request!
You might have already read the contributor guide, but as a reminder, please make sure to:

  • Add a Signed-off-by line to each commit (git commit -s) per the DCO
  • Rebase your changes on the latest main branch and squash your commits
  • Add/Update unit tests as needed
  • Run a build and make sure all tests pass prior to submission

For more details, please check the contributor guide.
Thank you upfront!

- Created new VectorStoreRetriever functional interface for read-only operations
- Modified VectorStore to extend VectorStoreRetriever
- Removed duplicate similaritySearch methods from VectorStore
- Updated API documentation to reflect the interface separation
- Added package-info.java documentation for clarity

This change follows the principle of least privilege by providing a read-only
interface for retrieval operations while maintaining the full functionality
in VectorStore.

Fixes spring-projects#1290

Signed-off-by: Mark Pollack <[email protected]>
@sobychacko sobychacko merged commit cf2c3c5 into spring-projects:main Jul 17, 2025
2 checks passed
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.

VectorStore interface should be split, with readonly operations becoming a super interface
2 participants