Find answers from the community

Updated 3 months ago

Hello, I have an Issues about Qdrant

Hello, I have an Issues about Qdrant database vectore store, i would like my users, can delete or add file on a specific index for personalise it, it's easy to handle that with add logic, but for delete i need to delete every chunks (stored on qdrant) on a specifi adress with only the doc name as information. I arrive to delete some chunks but can anyone know how i can fetch every chunk with only doc name? Thanks you
f
1 comment
i arrive successfuly with the following code if someone needed : from qdrant_client import QdrantClient
from qdrant_client.http.models import Filter, FieldCondition, MatchValue

def delete_document_chunks(collection_name: str, file_name: str):
qdrant_client = QdrantClient(host='localhost', port=6333)


delete_filter = Filter(
must=[
FieldCondition(
key="file_name",
match=MatchValue(
value=file_name
)
)
]
)


qdrant_client.delete(
collection_name=collection_name,
wait=True,
points_selector=delete_filter
)
Add a reply
Sign up and join the conversation on Discord