Skip to content

add delete_all_documents() operation to QdrantDocumentStore #2310

@davidsbatista

Description

@davidsbatista
  • One possible solutions is to delete the collection holding all the documents and recreate it with the original configuraiton
client.delete_collection(collection_name=collection_name)

client.create_collection(
    collection_name=collection_name,
    vectors_config={
        "size": 768,  
        "distance": "Cosine"
    },
)
  • Another is to delete all points/documents using a wildcard filter
client.delete(
    collection_name=collection_name,
    points_selector=models.FilterSelector(
       filter=models.Filter(
           must=[  # Match all points (adjust if you have specific conditions)
               models.FieldCondition(
                   key="id",  # Assuming 'id' is a payload field; adjust if needed
                   match=models.MatchValue(value="*"),  # Wildcard (may not work for all field types)
                   )
                   ])),)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions