UpdateDescriptorSet
Updates existing descriptor set objects that satisfy the specified constraints.
Parameters
At least one of ref, with_name, or constraints is required. All supplied selectors are intersected; sets marked for background deletion are excluded.
Parameter | JSON type | Behavior |
|---|---|---|
| boolean | Optional. false. true requests descriptor/index refresh and waits for it; false requests refresh without waiting. Does not change user properties by itself. |
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. | |
string or array of strings | Optional. Existing configuration is unchanged; an empty array also leaves it unchanged. Case-sensitive values: Flat, IVF, HNSW. Nonempty arrays configure multiple engines. If a search omits engine, it selects the first configured engine in the fixed order Flat, IVF, HNSW, regardless of input-array order. Replaces the configured list and requests a descriptor-manager refresh. | |
string or array of strings | Optional. Existing configuration is unchanged; an empty array also leaves it unchanged. Case-sensitive values: L2, IP, CS. Nonempty arrays configure multiple metrics. If a search omits metric, it selects the first configured metric in the fixed order L2, IP, CS, regardless of input-array order. Replaces the configured list and requests a descriptor-manager refresh. | |
object mapping property names to values | Optional. When omitted, existing user properties are unchanged except for keys listed in remove_props. Stores booleans, numbers, strings, supported arrays, or single-key _date, _blob, and _json wrappers. Bare null is rejected; property names and wrapped values are validated. See the properties reference for nested value rules. Replaces supplied property values without replacing the whole property map. | |
integer, 1 through 100000 | Optional. Select using the other supplied selectors; see the selection rule above. Uses an earlier compatible DescriptorSet reference in this transaction; forward references, wrong types, and undeclared references are rejected. | |
array of strings | Optional. When omitted, no properties are removed. Removes named properties from selected objects; missing keys have no effect. A value also supplied in properties is stored after removal. | |
string | Optional. No set-name restriction; ref or constraints must be supplied. Filters by exact descriptor-set name. Applied with ref and constraints; sets pending background deletion are excluded. |
Details
If the ref parameter is used, with_name and constraints will act as additional filters on the referenced result set.
If the ref parameter is specified, it must refer to the results of an earlier AddDescriptorSet or FindDescriptorSet.
The with_name parameter specifies the “name” of the DescriptorSet and is guaranteed to be unique.
For more complex searches for objects to update, a Find command must be used first within the transaction.
Response and errors
An authenticated session with the objects update permission is required.
The response is an object under UpdateDescriptorSet 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. Descriptor refresh can fail while building the response after the graph update; an error response alone does not prove that the graph update was undone.
Examples
Find the descriptor sets with the “source” property equal to “open_face”, and remove the “valid” property:
[{
"UpdateDescriptorSet": {
"constraints": ["$source", "==", "open_face"],
"remove_props": ["valid"]
}
}]
Successful response:
[{
"UpdateDescriptorSet": {
"count": 1,
"status": 0
}
}]
Update the “valid” property of all the descriptor sets that are connected to an entity of the class “Dataset” with a property “name” equal to “Youtube”:
[{
"FindEntity": {
"with_class": "Dataset",
"_ref": 1,
"constraints": ["$name", "==", "Youtube"]
}
}, {
"FindDescriptorSet": {
"_ref": 2,
"is_connected_to": {
"ref": 1,
"connection_class": "in_dataset"
}
}
}, {
"UpdateDescriptorSet": {
"ref": 2,
"properties": {
"valid": true
}
}
}]
Successful response:
[{
"FindEntity": {
"returned": 0,
"status": 0
}
}, {
"FindDescriptorSet": {
"returned": 0,
"status": 0
}
}, {
"UpdateDescriptorSet": {
"count": 1,
"status": 0
}
}]