DeleteDescriptor ================ Deletes descriptor objects that satisfy the specified constraints, and all the connections to/from those descriptor objects. Parameters ---------- At least one of ``ref``, ``with_class``, or ``constraints`` is required. All supplied selectors are intersected. .. list-table:: :header-rows: 1 :widths: 15 25 60 * - Parameter - JSON type - Behavior * - :ref:`constraints ` - array expression - Optional. No property filter; the command-specific selector requirement still applies. Filters existing objects using the constraints expression language. When ref is supplied it filters that referenced set. * - :ref:`ref ` - integer, 1 through 100000 - Optional. Select using the other supplied selectors; see the selection rule above. Uses an earlier compatible Descriptor reference in this transaction; forward references, wrong types, and undeclared references are rejected. * - ``with_class`` - string - Optional. No class restriction; another selector is required. Restricts descriptors by their descriptor class; applied together with ref and constraints. Details ------- .. include:: delete_details.rst Response and errors ------------------- An authenticated session with the objects delete permission is required. The response is an object under ``DeleteDescriptor`` with integer ``status`` and, on success, integer ``count``. Status 0 means the mutation completed; count is the number of selected objects affected, including zero when none match. No output blobs are returned. Invalid field types, missing required fields, malformed expressions, and invalid references fail validation. Execution failures include a nonzero status and an ``info`` message; inspect the transaction response before assuming a mutation succeeded. Deleting nodes also removes incident connections. Examples -------- Delete descriptors with "confidence" property less than 0.8: .. TESTED_EXAMPLE: DeleteDescriptor_1 .. code-block:: json [{ "DeleteDescriptor": { "with_class": "embeddings", "constraints": ["$confidence", "<=", 0.8] } }] Successful response: .. TESTED_EXAMPLE: DeleteDescriptor_1_response .. code-block:: json [{ "DeleteDescriptor": { "count": 9, "status": 0 } }] Delete descriptors with "confidence" property less than 0.8 and connections to entities of class "Person" with the "age" property equal to 30: .. TESTED_EXAMPLE: DeleteDescriptor_2 .. code-block:: json [{ "FindEntity": { "with_class": "Person", "_ref": 1, "constraints": ["$age", "==", 30] } }, { "FindDescriptor": { "_ref": 2, "constraints": ["$confidence", "<=", 0.8], "is_connected_to": { "ref": 1 } } }, { "DeleteDescriptor": { "ref": 2 } }] Successful response: .. TESTED_EXAMPLE: DeleteDescriptor_2_response .. code-block:: json [{ "FindEntity": { "returned": 0, "status": 0 } }, { "FindDescriptor": { "returned": 0, "status": 0 } }, { "DeleteDescriptor": { "count": 1, "status": 0 } }]