diff --git a/content/commands/vismember.md b/content/commands/vismember.md new file mode 100644 index 0000000000..4093d1e32f --- /dev/null +++ b/content/commands/vismember.md @@ -0,0 +1,66 @@ +--- +arguments: +- name: key + type: key +- name: element + type: string +arity: 3 +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +command_flags: +- READONLY +complexity: O(1) +description: Check if an element exists in a vector set. +function: vismemberCommand +group: vector_set +hidden: false +linkTitle: VISMEMBER +since: 8.0.0 +summary: Check if an element exists in a vector set. +syntax_fmt: VISMEMBER key element +syntax_str: element +title: VISMEMBER +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Check if an element exists in a vector set. + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element you want to check for membership. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) + +## Return information + +{{< multitabs id="vismember-return-info" + tab1="RESP2" + tab2="RESP3" >}} + +[Integer reply](../../develop/reference/protocol-spec#integers): `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](../../develop/reference/protocol-spec#booleans): `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 >}} diff --git a/content/commands/vrem.md b/content/commands/vrem.md index 444692b059..227c1e65e2 100644 --- a/content/commands/vrem.md +++ b/content/commands/vrem.md @@ -10,12 +10,12 @@ categories: - kubernetes - clients complexity: O(log(N)) for each element removed, where N is the number of elements in the vector set. -description: Remove one or more elements from a vector set. +description: Remove an element from a vector set. group: vector_set hidden: false linkTitle: VREM since: 8.0.0 -summary: Remove one or more elements from a vector set. +summary: Remove an element from a vector set. syntax_fmt: "VREM key element" title: VREM bannerText: Vector set is a new data type that is currently in preview and may be subject to change. @@ -26,14 +26,10 @@ Remove an element from a vector set. ```shell VADD vset VALUES 3 1 0 1 bar (integer) 1 -``` -```shell VREM vset bar (integer) 1 -``` -```shell VREM vset bar (integer) 0 ``` diff --git a/content/commands/vsim.md b/content/commands/vsim.md index 9853b5c93c..78a568a3c8 100644 --- a/content/commands/vsim.md +++ b/content/commands/vsim.md @@ -19,7 +19,7 @@ history: linkTitle: VSIM since: 8.0.0 summary: Return elements by vector similarity. -syntax_fmt: "VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [WITHATTRIBS] [COUNT num]\n [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]" +syntax_fmt: "VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [WITHATTRIBS] [COUNT num]\n [EPSILON delta] [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort]\n [TRUTH] [NOTHREAD]" title: VSIM bannerText: Vector set is a new data type that is currently in preview and may be subject to change. --- @@ -99,6 +99,12 @@ returns, for each element, the JSON attribute associated with the element or NUL limits the number of returned results to `num`. +
+EPSILON delta + +is a floating point number between 0 and 1. It is used to retrieve elements that have a distance that is no further than the specified `delta`. In vector sets, returned elements have a similarity score (when compared to the query vector) that is between 1 and 0, where 1 means identical and 0 means opposite vectors. For example, if the `EPSILON` option is specified with an argument of `0.2`, it means only elements that have a similarity of 0.8 or better (a distance < 0.2) are returned. This is useful when you specify a large `COUNT`, but you don't want elements that are too far away from the query vector. +
+
EF search-exploration-factor diff --git a/content/develop/data-types/vector-sets/_index.md b/content/develop/data-types/vector-sets/_index.md index f654418ff6..f730a52f60 100644 --- a/content/develop/data-types/vector-sets/_index.md +++ b/content/develop/data-types/vector-sets/_index.md @@ -33,6 +33,7 @@ The following commands are available for vector sets: - [VEMB]({{< relref "/commands/vemb" >}}) - retrieve the approximate vector associated with a vector set element. - [VGETATTR]({{< relref "/commands/vgetattr" >}}) - retrieve the attributes of a vector set element. - [VINFO]({{< relref "/commands/vinfo" >}}) - retrieve metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. +- [VISMEMBER]({{< relref "/commands/vismember" >}}) - check if an element exists in a vector set. - [VLINKS]({{< relref "/commands/vlinks" >}}) - retrieve the neighbors of a specified element in a vector set; the connections for each layer of the HNSW graph. - [VRANDMEMBER]({{< relref "/commands/vrandmember" >}}) - retrieve random elements of a vector set. - [VREM]({{< relref "/commands/vrem" >}}) - remove an element from a vector set.