Back to Redis

VISMEMBER

content/commands/vismember.md

latest1.4 KB
Original Source

Check if an element exists in a vector set.

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 you want to check for membership.

</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="vismember-return-info" tab1="RESP2" tab2="RESP3" >}}

Integer reply: 0 if the element does not exist in the vector set, or the key does not exist. 1 if the element exists in the vector set.

-tab-sep-

Boolean reply: false if the element does not exist in the vector set, or the key does not exist. true if the element exists in the vector set.

{{< /multitabs >}}