Skip to content

Commit 6b692b9

Browse files
committedMar 21, 2025·
Initial commit of vector set docs
1 parent 8a7a522 commit 6b692b9

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
 

‎content/commands/vadd/index.md

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
categories:
3+
- docs
4+
- develop
5+
- stack
6+
- oss
7+
- rs
8+
- rc
9+
- oss
10+
- kubernetes
11+
- clients
12+
complexity: O(log(N)) for each element added, where N is the number of elements in the vector set.
13+
description: Add one or more elements to a vector set, or update its vector if it already exists.
14+
group: vector_set
15+
hidden: false
16+
linkTitle: VADD
17+
since: 1.0.0
18+
summary: Add one or more elements to a vector set, or update its vector if it already exists
19+
syntax_fmt: "VADD key [REDUCE dim] FP32|VALUES vector element [CAS] [NOQUANT | Q8 | BIN]\n [EF build-exploration-factor] [SETATTR <attributes>] [M <numlinks>]"
20+
title: VADD
21+
---
22+
Sets the specified fields to their respective values in the hash stored at `key`.
23+
24+
This command overwrites the values of specified fields that exist in the hash.
25+
If `key` doesn't exist, a new key holding a hash is created.
26+
27+
## Examples
28+
29+
{{< clients-example cmds_hash hset >}}
30+
> HSET myhash field1 "Hello"
31+
(integer) 1
32+
> HGET myhash field1
33+
"Hello"
34+
> HSET myhash field2 "Hi" field3 "World"
35+
(integer) 2
36+
> HGET myhash field2
37+
"Hi"
38+
> HGET myhash field3
39+
"World"
40+
> HGETALL myhash
41+
1) "field1"
42+
2) "Hello"
43+
3) "field2"
44+
4) "Hi"
45+
5) "field3"
46+
6) "World"
47+
{{< /clients-example >}}
48+
49+
Give these commands a try in the interactive console:
50+
51+
{{% redis-cli %}}
52+
HSET myhash field1 "Hello"
53+
HGET myhash field1
54+
HSET myhash field2 "Hi" field3 "World"
55+
HGET myhash field2
56+
HGET myhash field3
57+
HGETALL myhash
58+
{{% /redis-cli %}}

‎layouts/commands/list.html

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ <h1>Commands</h1>
5454
<option value="timeseries" data-kind="stack">Time series</option>
5555
<option value="topk" data-kind="stack">Top-k</option>
5656
<option value="transactions" data-kind="core">Transactions</option>
57+
<option value="vector_set" data-kind="core">Vector set</option>
5758
</select>
5859
<div style="display:none">
5960
<label for="version-filter">by version</label>

0 commit comments

Comments
 (0)
Please sign in to comment.