Vector set is a new data type that is currently in preview and may be subject to change.
VSETATTR key element "{ JSON obj }"
Associate a JSON object with an element in a vector set. Use this command to store attributes that can be used in filtered similarity searches with VSIM.
You can also update existing attributes or delete them by setting an empty string.
VSETATTR key element "{\"type\": \"fruit\", \"color\": \"red\"}"
To remove attributes, pass an empty JSON string:
VSETATTR key element ""
keyis the name of the key that holds the vector set.
elementis the name of the element whose attributes you want to set or remove.
jsonis a valid JSON string. Use an empty string ("") to delete the attributes.
| Redis Enterprise |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard ✅ Active-Active |
✅ Standard ✅ Active-Active |
One of the following: