Skip to content

[Store] Delete data from store #1584

@genosajd

Description

@genosajd

There should be a possibility to delete points from the store, for example by metadata or by ID.

In my case (I use qdrant), when I add a file to the store and also save information about this file in the Doctrine database, I want to have the ability to remove this file (or multiple files) both from the Doctrine DB and from the vector store.

public function deletePointByMetadata(array $metadataFilter): void
{
    $this->request(
        'POST',
        \sprintf('collections/%s/points/delete', $this->collectionName),
        [
            'filter' => [
                'must' => [
                    [
                        'key' => array_key_first($metadataFilter),
                        'match' => [
                            'value' => $metadataFilter[array_key_first($metadataFilter)],
                        ],
                    ],
                ],
            ],
        ],
        ['wait' => $this->async ? 'false' : 'true'],
    );
}

Or a more general function like public function delete(...) that would allow deleting either by ID or by metadata.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFCRFC = Request For Comments (proposals about features that you want to be discussed)StoreIssues & PRs about the AI Store component

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions