Back to Redis

VGETATTR

content/commands/vgetattr.md

latest1.6 KB
Original Source

Return the JSON attributes associated with an element in a vector set.

shell
VGETATTR key element

Required arguments

<details open> <summary><code>key</code></summary>

is the name of the key that holds the vector set.

</details> <details open> <summary><code>element</code></summary>

is the name of the element whose attributes you want to retrieve.

</details>
  • [Vector sets]({{< relref "/develop/data-types/vector-sets" >}})

Redis Software and Redis Cloud compatibility

| Redis Software | Redis Cloud | <span style="min-width: 9em; display: table-cell">Notes</span> | |:----------------------|:-----------------|:------| | <span title="Supported">✅ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | <span title="Supported">✅ Standard</span> <span title="Not supported"><nobr>❌ Active-Active</nobr></span> | |

Return information

{{< multitabs id="vgetattr-return-info" tab1="RESP2" tab2="RESP3" >}}

One of the following:

  • Simple string reply containing the JSON attribute(s).
  • Bulk string reply (null bulk string) for unknown key or element, or when no attributes exist for the given key/element pair.

-tab-sep-

One of the following:

  • Simple string reply containing the JSON attribute(s).
  • Null reply for unknown key or element, or when no attributes exist for the given key/element pair.

{{< /multitabs >}}