Description
I looked at the support page for delete_many but nowhere does it mention how to put multiple properties: Delete objects | Weaviate
Is it even possible?
Can I delete all objects where property A = “Hello” and property B = “World”?
Here is the code I have so far, but it is throwing assertion error:
metadata = {
"document_name": "my_document",
"document_type": "xml",
"source": "source1"
}
filters = {
"operator": "And",
"operands": [
{
"path": [key],
"operator": "Equal",
"valueString": value
} for key, value in metadata.items()
]
}
print(filters)
collection = self.__get_tenant_collection_object(self.collection_name, tenant_name)
response = collection.data.delete_many(
where=filters
)
I want to delete all documents that have
"document_name" = "my_document"
AND
"document_type" = "xml"
AND
"source" = "source1"
Server Setup Information
- Weaviate Server Version: Cloud
- Deployment Method:
- Multi Node? Number of Running Nodes: Cloud
- Client Language and Version: Python 3.10, Weaviate 4.8.1
- Multitenancy?: yes