Skip to content

[Feature Request] Add deleteAll() or clear() method to VectorStore interface #5724

@suwe12

Description

@suwe12

Expected Behavior
Suggest adding a default void deleteAll() method to the VectorStore interface to provide a unified collection clearing method for various vector store implementations.

Current Behavior
Currently, the VectorStore interface only provides the delete(List idList) method. There is no unified high-level clearing method, forcing developers to rely on specific implementations (such as directly operating ChromaApi), which breaks the encapsulation effect of the abstraction layer.

Context
I am a developer currently using Spring AI 1.1.2 and Chroma to develop an AI intent recognition platform. During integration testing and model performance evaluation, I frequently need to reset the vector data to ensure that each test run starts from a clean state.

Willingness to contribute
I very much hope to contribute code to Spring AI, and I would like to ask the maintainers for confirmation: Is it allowed to add deleteAll() in VectorStore and implement the ChromaVectorStore version? If this proposal is consistent, I will be very happy to complete this Pull Request after receiving your confirmation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions