Skip to content

Commit 63a9de0

Browse files
dwdoughertyandy-stark-redismich-elle-lunakaitlynmichaelpaoloredis
authored
Redis Open Source 8.2 docs (#1884)
* Add doc for used_memory_peak_time per yzc-yzc * DOC-5368: update VSIM command page for ROS8.2 (#1765) * DOC-5368: update VSIM command page for ROS8.2 * Apply review comments. Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --------- Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> * DOC-5367: update bitmap docs for ROS8.2 (#1759) * DOC-5367: update bitmap docs for ROS8.2 * Apply review comments. * DOC-5371: new CLUSTER SLOT-STATS command page for ROS8.2 (#1773) * DOC-5412: update KSN page for ROS8.2 (#1789) * DOC-5366: write new streams docs for ROS8.2 (#1788) * DEV: write new streams docs for ROS8.2 * Apply suggestions from code review * DOC-5423: update the modules API page (#1815) * Improve rack-awareness documentation for Kubernetes - Add clear explanation of node labeling requirements for rack-awareness - Emphasize that ALL eligible nodes must be labeled with chosen label - Explain what eligible nodes are (nodes where RS pods can be scheduled) - Suggest topology.kubernetes.io/zone as commonly available label - Clarify that not all platforms have this label by default - Update example to use current topology.kubernetes.io/zone instead of deprecated failure-domain.beta.kubernetes.io/zone - Fix kubectl command formatting (add space after $) - Add warning about operator failing if nodes are missing labels Addresses DOC-1815 * Update content/operate/kubernetes/recommendations/node-selection.md Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> * Update content/operate/kubernetes/recommendations/node-selection.md Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> * Update content/operate/kubernetes/recommendations/node-selection.md Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> * Update content/operate/kubernetes/recommendations/node-selection.md Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> * Update content/operate/kubernetes/recommendations/node-selection.md Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> * Move redisvl documentation * Remove type integration * Add redisvl/_index.md * Fix relrefs * Add aliases * Add missing aliases * DOC-3967 moved/expanded keyspace page * DOC-3967 fixed links to keyspace page * DOC-3967 moved transaction and pipeline pages to reference section * DOC-3967 moved patterns folder to clients * DOC-3967 moved programmability folder into develop * DOC-3967 fixed links to programmability section * DOC-3967 added aliases to programmability pages * DOC-3967 moved pub/sub and keyspace notification pages * DOC-3967 added missing aliases * RDI: Add Reboot step after parameter group step * add link icon to section headers (#1755) * add link icon to section headers * review suggestions * toc embed fix * Attempt to fix the broken on this page ToC for embedded content that includes headers --------- Co-authored-by: Rachel Elledge <rachel.elledge@redislabs.com> * mention admission controller (#1791) * relref fix (#1793) * Update content/operate/rc/api/api-reference/openapi.json * fix typo (#1795) * DOC-5419 added commands section * DOC-5419 fixed dodgy link * RS: Adjusted best practices for scalable Redis query engine & add benchmarks (#1687) * DOC-4271 RS: Adjusted best practices for scalable Redis query engine & add benchmarks * Style guide fix for indexes * Fixed broken relrefs after AI/search reorg * RS: Added missing module requirements to recover DB (#1679) * DOC-4564 RS: Added missing module requirements to recover DB * DOC-4564 Added rladmin command to identify module versions required by recoverable DBs * DOC-4564 Copied missing module requirements to recover DB to RS 7.4 and 7.8 versions * RS: Added DB port access requirement for Replica Of between different RS clusters (#1650) * DOC-3829 RS: Added DB port access requirement for Replica Of between different RS clusters * Updated relrefs to correct versions * Update ai-videos.md * Fix search-and-query documentation aliases for backward compatibility ## Critical alias fixes to resolve 404 errors and incorrect redirects: ### Fixed broken basic-constructs aliases: - field-and-type-options.md: Fixed alias to point to correct interact paths - schema-definition.md: Fixed alias to point to correct interact paths - configuration.md: Added missing interact aliases and fixed format ### Fixed directory redirect issues (_index.md files): - Added trailing slash variants for all directory aliases - Fixed indexing/ and query/ URLs that were redirecting to home page - Updated: _index.md, indexing/_index.md, query/_index.md, advanced-concepts/_index.md, administration/_index.md, best-practices/_index.md, deprecated/_index.md ### Added missing aliases: - index-mgmt-best-practices.md: Added missing interact alias - aggregations-syntax.md: Added missing interact alias ### Root causes addressed: - Aliases were incorrectly pointing to /ai/ paths instead of /interact/ paths - Directory aliases needed both with/without trailing slash variants - Some files missing interact aliases entirely These fixes should resolve: - 404 errors on basic-constructs URLs - Directory URLs redirecting to home page instead of correct AI locations - Missing backward compatibility for moved files Addresses DOC-5428 * Update redisvl workflow (#1802) * DEV: (RediSearch) doc expiration capabilities in Redis 8 (#1792) * DEV: (RediSearch) doc expiration capabilities in Redis 8 * Apply suggestions from code review Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> * Apply more suggestions from code review --------- Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> * add leading slash to alias (#1804) * DOC-5423: update the modules API page --------- Co-authored-by: mich-elle-luna <michelle.luna@redis.com> Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> Co-authored-by: paoloredis <paolo.lazzari@redis.com> Co-authored-by: Andy Stark <andrew.stark@redis.com> Co-authored-by: Cameron Bates <cameron.bates@redis.com> Co-authored-by: Rachel Elledge <rachel.elledge@redislabs.com> Co-authored-by: redisdocsapp[bot] <177626021+redisdocsapp[bot]@users.noreply.github.com> Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> Co-authored-by: JooYoung Lim <qkdlql@naver.com> Co-authored-by: Cameron Bates <102550101+cmilesb@users.noreply.github.com> Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com> Co-authored-by: paoloredis <158162796+paoloredis@users.noreply.github.com> * Fix docs about the A param of KSN config (#1803) * Fix docs about the A param of KSN config * Fix docs, excluding events from A param * final fix for ksn docs * DOC-5457: add the new SVS-VAMANA vector algorithm type (#1822) * DOC-5457: add the new SVS-VAMANA vector algorithm type * Apply suggestions from code review Thank you, @mich-elle-luna! Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> * Apply more suggestions from code review * Apply misspelling fix * Apply more suggestions from code review --------- Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> * DOC-5491: add new CASE function and also augment the SVS_VAMANA changes with additional info (#1869) * DOC-5495: modify vector set docs for 8.2 (initial commit) (#1875) * DOC-5495: modify vector set docs for 8.2 (initial commit) * Remove merge info * Added EPSILON info * Apply code review suggestions * DOC-5504: update modules API doc (#1882) --------- Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> Co-authored-by: mich-elle-luna <michelle.luna@redis.com> Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> Co-authored-by: Kaitlyn Michael <76962844+kaitlynmichael@users.noreply.github.com> Co-authored-by: paoloredis <paolo.lazzari@redis.com> Co-authored-by: Andy Stark <andrew.stark@redis.com> Co-authored-by: Cameron Bates <cameron.bates@redis.com> Co-authored-by: Rachel Elledge <rachel.elledge@redislabs.com> Co-authored-by: redisdocsapp[bot] <177626021+redisdocsapp[bot]@users.noreply.github.com> Co-authored-by: JooYoung Lim <qkdlql@naver.com> Co-authored-by: Cameron Bates <102550101+cmilesb@users.noreply.github.com> Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com> Co-authored-by: paoloredis <158162796+paoloredis@users.noreply.github.com> Co-authored-by: Mincho Paskalev <minchopaskal@gmail.com>
1 parent 4a98ea6 commit 63a9de0

File tree

20 files changed

+1279
-121
lines changed

20 files changed

+1279
-121
lines changed

content/commands/bitop.md

Lines changed: 58 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ arguments:
2121
name: not
2222
token: NOT
2323
type: pure-token
24+
- display_text: diff
25+
name: diff
26+
token: DIFF
27+
type: pure-token
28+
- display_text: diff1
29+
name: diff1
30+
token: DIFF1
31+
type: pure-token
32+
- display_text: andor
33+
name: andor
34+
token: ANDOR
35+
type: pure-token
36+
- display_text: one
37+
name: one
38+
token: ONE
39+
type: pure-token
2440
name: operation
2541
type: oneof
2642
- display_text: destkey
@@ -78,26 +94,45 @@ key_specs:
7894
linkTitle: BITOP
7995
since: 2.6.0
8096
summary: Performs bitwise operations on multiple strings, and stores the result.
81-
syntax_fmt: BITOP <AND | OR | XOR | NOT> destkey key [key ...]
97+
syntax_fmt: "BITOP <AND | OR | XOR | NOT | DIFF | DIFF1 | ANDOR | ONE> destkey key [key ...]"
8298
syntax_str: destkey key [key ...]
8399
title: BITOP
84100
---
85101
Perform a bitwise operation between multiple keys (containing string values) and
86102
store the result in the destination key.
87103

88-
The `BITOP` command supports four bitwise operations: **AND**, **OR**, **XOR**
89-
and **NOT**, thus the valid forms to call the command are:
104+
The `BITOP` command supports eight bitwise operations: `AND`, `OR`, `XOR`,
105+
`NOT`, `DIFF`, `DIFF1`, `ANDOR`, and `ONE`. The valid forms to call the command are:
90106

91107

92108
* `BITOP AND destkey srckey1 srckey2 srckey3 ... srckeyN`
109+
110+
A bit in `destkey` is set only if it is set in all source bitmaps.
93111
* `BITOP OR destkey srckey1 srckey2 srckey3 ... srckeyN`
112+
113+
A bit in `destkey` is set only if it is set in at least one source bitmap.
94114
* `BITOP XOR destkey srckey1 srckey2 srckey3 ... srckeyN`
115+
116+
Mostly used with two source bitmaps, a bit in `destkey` is set only if its value differs between the two source bitmaps.
95117
* `BITOP NOT destkey srckey`
96118

97-
As you can see **NOT** is special as it only takes an input key, because it
98-
performs inversion of bits so it only makes sense as a unary operator.
119+
`NOT` is a unary operator and only supports a single source bitmap; set the bit to the inverse of its value in the source bitmap.
120+
* `BITOP DIFF destkey X [Y1 Y2 ...]` <sup>[1](#list-note-1)</sup>
121+
122+
A bit in `destkey` is set if it is set in `X`, but not in any of `Y1, Y2, ...` .
123+
* `BITOP DIFF1 destkey X [Y1 Y2 ...]` <sup>[1](#list-note-1)</sup>
99124

100-
The result of the operation is always stored at `destkey`.
125+
A bit in `destkey` is set if it is set in one or more of `Y1, Y2, ...`, but not in `X`.
126+
* `BITOP ANDOR destkey X [Y1 Y2 ...]` <sup>[1](#list-note-1)</sup>
127+
128+
A bit in `destkey` is set if it is set in `X` and also in one or more of `Y1, Y2, ...`.
129+
* `BITOP ONE destkey X1 [X2 X3 ...]` <sup>[1](#list-note-1)</sup>
130+
131+
A bit in `destkey` is set if it is set in exactly one of `X1, X2, ...`.
132+
133+
The result of each operation is always stored at `destkey`.
134+
135+
1. <a name="list-note-1"></a> Added in Redis 8.2.
101136

102137
## Handling of strings with different lengths
103138

@@ -110,13 +145,27 @@ zero bytes up to the length of the longest string.
110145

111146
## Examples
112147

148+
1. Basic usage example using the `AND` operator:
149+
113150
{{% redis-cli %}}
114-
SET key1 "foobar"
115-
SET key2 "abcdef"
151+
BITFIELD key1 SET i8 #0 255
152+
BITFIELD key2 SET i8 #0 85
116153
BITOP AND dest key1 key2
117-
GET dest
154+
BITFIELD dest GET i8 #0
118155
{{% /redis-cli %}}
119156

157+
2. Suppose you want to expose people to a book-related ad. The target audience is people who love to read books and are interested in fantasy, adventure, or science fiction. Assume you have the following bitmaps:
158+
159+
* `LRB` - people who love to read books.
160+
* `B:F` - people interested in fantasy.
161+
* `B:A` - people interested in adventure.
162+
* `B:SF` - people interested in science fiction.
163+
164+
To create a bitmap representing the target audience, use the following command:
165+
166+
```
167+
BITOP ANDOR TA LRB B:F B:A B:SF
168+
```
120169

121170
## Pattern: real time metrics using bitmaps
122171

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
arguments:
3+
- arguments:
4+
- arguments:
5+
- name: start-slot
6+
type: integer
7+
- name: end-slot
8+
type: integer
9+
name: slotsrange
10+
token: SLOTSRANGE
11+
type: block
12+
- arguments:
13+
- name: metric
14+
type: string
15+
- name: limit
16+
optional: true
17+
token: LIMIT
18+
type: integer
19+
- arguments:
20+
- name: asc
21+
token: ASC
22+
type: pure-token
23+
- name: desc
24+
token: DESC
25+
type: pure-token
26+
name: order
27+
optional: true
28+
type: oneof
29+
name: orderby
30+
token: ORDERBY
31+
type: block
32+
name: filter
33+
type: oneof
34+
arity: -4
35+
categories:
36+
- docs
37+
- develop
38+
- stack
39+
- oss
40+
- rs
41+
- rc
42+
- oss
43+
- kubernetes
44+
- clients
45+
command_flags:
46+
- STALE
47+
- LOADING
48+
command_tips:
49+
- NONDETERMINISTIC_OUTPUT
50+
- REQUEST_POLICY:ALL_SHARDS
51+
complexity: O(N) where N is the total number of slots based on arguments. O(N*log(N))
52+
with ORDERBY subcommand.
53+
container: CLUSTER
54+
description: Return an array of slot usage statistics for slots assigned to the current
55+
node.
56+
function: clusterSlotStatsCommand
57+
group: cluster
58+
hidden: false
59+
linkTitle: CLUSTER SLOT-STATS
60+
reply_schema:
61+
description: Array of nested arrays, where the inner array element represents a
62+
slot and its respective usage statistics.
63+
items:
64+
description: Array of size 2, where 0th index represents (int) slot and 1st index
65+
represents (map) usage statistics.
66+
items:
67+
- description: Slot Number.
68+
type: integer
69+
- additionalProperties: false
70+
description: Map of slot usage statistics.
71+
properties:
72+
cpu-usec:
73+
type: integer
74+
key-count:
75+
type: integer
76+
network-bytes-in:
77+
type: integer
78+
network-bytes-out:
79+
type: integer
80+
type: object
81+
maxItems: 2
82+
minItems: 2
83+
type: array
84+
type: array
85+
since: 8.2.0
86+
summary: Return an array of slot usage statistics for slots assigned to the current
87+
node.
88+
syntax_fmt: "CLUSTER SLOT-STATS <SLOTSRANGE\_start-slot end-slot | ORDERBY\_metric\n [LIMIT\_\
89+
limit] [ASC | DESC]>"
90+
syntax_str: ''
91+
title: CLUSTER SLOT-STATS
92+
---
93+
94+
Use this command to get an array of slot usage statistics for the slots assigned to the current shard. If you're working with a Redis cluster, this data helps you understand overall slot usage, spot hot or cold slots, plan slot migrations to balance load, or refine your application logic to better distribute keys.
95+
96+
## Options
97+
98+
`CLUSTER SLOT-STATS` has two mutually exclusive options:
99+
100+
* `ORDERBY`: Sorts the slot statistics by the specified metric. Use ASC or DESC to sort in ascending or descending order. If multiple slots have the same value, the command uses the slot number as a tiebreaker, sorted in ascending order.
101+
102+
* `SLOTSRANGE`: Limits the results to a specific, inclusive range of slots. Results are always sorted by slot number in ascending order.
103+
104+
The command reports on the following statistics:
105+
106+
* `KEY-COUNT`: Number of keys stored in the slot.
107+
* `CPU-USEC`: CPU time (in microseconds) spent handling the slot.
108+
* `NETWORK-BYTES-IN`: Total inbound network traffic (in bytes) received by the slot.
109+
* `NETWORK-BYTES-OUT`: Total outbound network traffic (in bytes) sent from the slot.
110+
111+
## Return information
112+
113+
{{< multitabs id=“cmd-name-return-info"
114+
tab1="RESP2"
115+
tab2="RESP3" >}}
116+
117+
One of the following:
118+
119+
* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a nested list of slot usage statistics.
120+
* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) otherwise.
121+
122+
-tab-sep-
123+
124+
One of the following:
125+
126+
* [Array reply]({{< relref "/develop/reference/protocol-spec#arrays" >}}): a nested list of slot usage statistics.
127+
* [Simple error]({{< relref "/develop/reference/protocol-spec#simple-errors" >}}) otherwise.
128+
129+
{{< /multitabs >}}

content/commands/ft.aggregate.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,27 @@ Next, count GitHub events by user (actor), to produce the most active users.
484484

485485
</details>
486486

487+
<details open>
488+
<summary><b>Use the case function for conditional logic</b></summary>
489+
{{< highlight bash >}}
490+
//Simple mapping
491+
FT.AGGREGATE products "*"
492+
APPLY case(@price > 100, "premium", "standard") AS category
493+
494+
//Nested conditions where an error should be returned
495+
FT.AGGREGATE orders "*"
496+
APPLY case(@status == "pending",
497+
case(@priority == "high", 1, 2),
498+
case(@status == "completed", 3, 4)) AS status_code
499+
500+
//Mapped approach
501+
FT.AGGREGATE orders "*"
502+
APPLY case(@status == "pending", 1, 0) AS is_pending
503+
APPLY case(@is_pending == 1 && @priority == "high", 1,2) AS status_high
504+
APPLY case(@is_pending == 0 && @priority == "high", 3,4) AS status_completed
505+
{{< / highlight >}}
506+
507+
</details>
487508
## Return information
488509

489510
{{< multitabs id="ft-aggregate-return-info"

content/commands/info.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ Here is the meaning of all fields in the **memory** section:
152152
* `used_memory_rss_human`: Human readable representation of previous value
153153
* `used_memory_peak`: Peak memory consumed by Redis (in bytes)
154154
* `used_memory_peak_human`: Human readable representation of previous value
155+
* `used_memory_peak_time`: Time when peak memory was recorded
155156
* `used_memory_peak_perc`: The percentage of `used_memory` out of `used_memory_peak`
156157
* `used_memory_overhead`: The sum in bytes of all overheads that the server
157158
allocated for managing its internal data structures

content/commands/vismember.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
arguments:
3+
- name: key
4+
type: key
5+
- name: element
6+
type: string
7+
arity: 3
8+
categories:
9+
- docs
10+
- develop
11+
- stack
12+
- oss
13+
- rs
14+
- rc
15+
- oss
16+
- kubernetes
17+
- clients
18+
command_flags:
19+
- READONLY
20+
complexity: O(1)
21+
description: Check if an element exists in a vector set.
22+
function: vismemberCommand
23+
group: vector_set
24+
hidden: false
25+
linkTitle: VISMEMBER
26+
since: 8.0.0
27+
summary: Check if an element exists in a vector set.
28+
syntax_fmt: VISMEMBER key element
29+
syntax_str: element
30+
title: VISMEMBER
31+
bannerText: Vector set is a new data type that is currently in preview and may be subject to change.
32+
---
33+
34+
Check if an element exists in a vector set.
35+
36+
## Required arguments
37+
38+
<details open>
39+
<summary><code>key</code></summary>
40+
41+
is the name of the key that holds the vector set.
42+
</details>
43+
44+
<details open>
45+
<summary><code>element</code></summary>
46+
47+
is the name of the element you want to check for membership.
48+
</details>
49+
50+
## Related topics
51+
52+
- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}})
53+
54+
## Return information
55+
56+
{{< multitabs id="vismember-return-info"
57+
tab1="RESP2"
58+
tab2="RESP3" >}}
59+
60+
[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.
61+
62+
-tab-sep-
63+
64+
[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.
65+
66+
{{< /multitabs >}}

content/commands/vrem.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ categories:
1010
- kubernetes
1111
- clients
1212
complexity: O(log(N)) for each element removed, where N is the number of elements in the vector set.
13-
description: Remove one or more elements from a vector set.
13+
description: Remove an element from a vector set.
1414
group: vector_set
1515
hidden: false
1616
linkTitle: VREM
1717
since: 8.0.0
18-
summary: Remove one or more elements from a vector set.
18+
summary: Remove an element from a vector set.
1919
syntax_fmt: "VREM key element"
2020
title: VREM
2121
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.
2626
```shell
2727
VADD vset VALUES 3 1 0 1 bar
2828
(integer) 1
29-
```
3029

31-
```shell
3230
VREM vset bar
3331
(integer) 1
34-
```
3532

36-
```shell
3733
VREM vset bar
3834
(integer) 0
3935
```

0 commit comments

Comments
 (0)