sjyangkevin commented on code in PR #50735:
URL: https://github.com/apache/airflow/pull/50735#discussion_r2096096621
##########
providers/weaviate/src/airflow/providers/weaviate/hooks/weaviate.py:
##########
@@ -190,6 +191,66 @@ def get_collection(self, name: str) -> Collection:
client = self.conn
return client.collections.get(name)
+ def delete_by_property(
+ self,
Review Comment:
Thanks for the feedback. I am curious and want to understand it a bit more
clear. To make it keyword only, I think the function signature will be
`delete_by_property(self, **kwargs)`. Please correct me if I am wrong.
Since users can use this method to delete multiple properties in multiple
collections based on various filtering criteria. I found that it is more
flexible to let users define the filter. I tried to defined filter in the
method and let user passing parameters, and found that multiple use cases will
not be met (e.g., multiple filters chained by logical operator `&`, `|`). I
think it can also make sense if we set `dry_run` and `verbose` as `**kwargs`,
and make the `collection.dat.delete_many(where=filter_criteria, **kwargs)`
probably make it more flexible.
Let me know what you think, once we align, I will push a change to this PR.
thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]