UpdateDescriptor
Updates existing descriptor set objects that satisfy the specified constraints.
Parameters
[optional] ref: Reference to other descriptors within the transaction.
[optional] constraints
[optional] properties
[optional] remove_props
[optional] label
Details
If the ref parameter is used, constraints will be ignored.
If the ref parameter is specified, it must refers to the search results of a previous FindDescriptorSet.
If the label parameter is present, the descriptor’s labels will be updated.
For more complex searches for objects to update, a Find command must be used first within the transaction.
Examples
Find the descriptor set with the “source” property equal to “open_face”, and remove the “year_created” property, and rename it:
[ {
"UpdateDescriptor": {
"constraints": {
"source": [ "==", "open_face" ],
},
"remove_props": [ "year_created" ],
}
}]
Update the name of the descriptor set that is connected to an entity of the class “Dataset” with a property “name” equal to “Youtube”:
[ {
"FindEntity": {
"class": "Dataset",
"_ref": 1,
"constraints": {
"name": ["==", "Youtube"]
}
}
}, {
"FindDescriptorSet": {
"_ref": 2,
"is_connected_to": {
"ref": 1,
"class": "in_dataset"
},
"blobs": false
}
}, {
"UpdateDescriptor": {
"ref": 2,
"properties": {
"name": "Youtube8M"
}
}
}]