This command allows deletion of metadata entered via successful transactions before. If an entity is deleted, all its connections are deleted as well.
[optional] ref: Note: its not “_ref”. If you want to use results of a previous entity search result, you can use this parameter. It takes precedence over class + constraints. If the search results represented by ref were for an image/video/descriptor and you use DeleteEntity, it will leave around the associated files. [optional] class: name of entity class. (This can help restrict the search set)
“ref” allows the use of a previous search result to be used for querying meta information for the entities that were matched already. However, we do not support “_ref” in this call since all the entities here are going to be deleted. If “ref” is used, the search results represented by it will not be valid any more after this call even within the same transaction since the entities will have been deleted.
If the constraints block is skipped, all entities with the given class are deleted. If no search constraints are specified, we return an error and do not delete all the metadata. So at least one of ref or class/constraint is required.
Warning: Our metadata solution was written primarily with read optimizations in mind. Delete is an expensive call. In the current version, we suggest avoiding deletes or doing them without too much parallelism and keeping transactions short. As we update our system towards more read/write balance, this will become more optimized.