fix weaviate delete issue
This commit is contained in:
parent
d57c82bfa8
commit
7dbbb277e6
@ -168,11 +168,11 @@ class WeaviateVector(BaseVector):
|
|||||||
# check whether the index already exists
|
# check whether the index already exists
|
||||||
schema = self._default_schema(self._collection_name)
|
schema = self._default_schema(self._collection_name)
|
||||||
if self._client.schema.contains(schema):
|
if self._client.schema.contains(schema):
|
||||||
|
for uuid in ids:
|
||||||
try:
|
try:
|
||||||
self._client.batch.delete_objects(
|
self._client.data_object.delete(
|
||||||
class_name=self._collection_name,
|
class_name=self._collection_name,
|
||||||
where={"operator": "ContainsAny", "path": ["id"], "valueTextArray": ids},
|
uuid=uuid,
|
||||||
output="minimal",
|
|
||||||
)
|
)
|
||||||
except weaviate.UnexpectedStatusCodeException as e:
|
except weaviate.UnexpectedStatusCodeException as e:
|
||||||
# tolerate not found error
|
# tolerate not found error
|
||||||
|
Loading…
Reference in New Issue
Block a user