Skip to content

Commit 63c0fce

Browse files
committed
Merge branch 'main' into release-rs-gilboa
2 parents 05f66d3 + 16fe3ac commit 63c0fce

File tree

50 files changed

+3402
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3402
-17
lines changed

content/develop/ai/search-and-query/advanced-concepts/geo.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ For example, the query below finds products within a 100 mile radius of Colorado
111111
FT.SEARCH productidx '@location:[-104.800644 38.846127 100 mi]'
112112
```
113113

114+
Note that `GEO` fields are stored in C `double` type variables and they are limited to approximately 15 to 17 digits of precision.
115+
114116
See [Geospatial queries]({{< relref "/develop/ai/search-and-query/query/geo-spatial" >}})
115117
for more information about the available query options and see
116118
[Geospatial indexing]({{< relref "/develop/ai/search-and-query/indexing/geoindex" >}})

content/develop/data-types/bitmaps.md

Lines changed: 167 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,180 @@ the number of days a given user visited the web site, while with
102102
a few [`BITPOS`]({{< relref "/commands/bitpos" >}}) calls, or simply fetching and analyzing the bitmap client-side,
103103
it is possible to easily compute the longest streak.
104104

105+
### Bitwise operations
106+
107+
The [`BITOP`]({{< relref "/commands/bitop" >}}) command performs bitwise
108+
operations over two or more source keys, storing the result in a destination key.
109+
110+
The examples below show the available operations using three keys: `A` (with bit pattern
111+
`11011000`), `B` (`00011001`), and `C` (`01101100`).
112+
113+
{{< image filename="/images/dev/bitmap/BitopSetup.svg" alt="Bitop setup" >}}
114+
115+
Numbering the bits from left to right, starting at zero, the following `SETBIT` commands
116+
will create these bitmaps:
117+
118+
{{< clients-example set="bitmap_tutorial" step="bitop_setup" >}}
119+
> SETBIT A 0 1
120+
(integer) 0
121+
> SETBIT A 1 1
122+
(integer) 0
123+
> SETBIT A 3 1
124+
(integer) 0
125+
> SETBIT A 4 1
126+
(integer) 0
127+
> GET A
128+
"\xd8"
129+
# Hex value: 0xd8 = 0b11011000
130+
131+
> SETBIT B 3 1
132+
(integer) 0
133+
> SETBIT B 4 1
134+
(integer) 0
135+
> SETBIT B 7 1
136+
(integer) 0
137+
> GET B
138+
"\x19"
139+
# Hex value: 0x19 = 0b00011001
140+
141+
> SETBIT C 1 1
142+
(integer) 0
143+
> SETBIT C 2 1
144+
(integer) 0
145+
> SETBIT C 4 1
146+
(integer) 0
147+
> SETBIT C 5 1
148+
(integer) 0
149+
> GET C
150+
"l"
151+
# ASCII "l" = hex 0x6c = 0b01101100
152+
{{< /clients-example >}}
153+
154+
#### `AND`
155+
156+
Set a bit in the destination key to 1 only if it is set in all the source keys.
157+
158+
{{< image filename="/images/dev/bitmap/BitopAnd.svg" alt="Bitop AND" >}}
159+
160+
{{< clients-example set="bitmap_tutorial" step="bitop_and" >}}
161+
> BITOP AND R A B C
162+
(integer) 1
163+
> GET R
164+
"\b"
165+
# ASCII "\b" (backspace) = hex 0x08 = 0b00001000
166+
{{< /clients-example >}}
167+
168+
#### `OR`
169+
Set a bit in the destination key to 1 if it is set in at least one of the source keys.
170+
171+
{{< image filename="/images/dev/bitmap/BitopOr.svg" alt="Bitop OR" >}}
172+
173+
{{< clients-example set="bitmap_tutorial" step="bitop_or" >}}
174+
> BITOP OR R A B C
175+
(integer) 1
176+
> GET R
177+
"\xfd"
178+
# Hex value: 0xfd = 0b11111101
179+
{{< /clients-example >}}
180+
181+
#### `XOR`
182+
183+
For two source keys, set a bit in the destination key to 1 if the value of the bit is
184+
different in the two keys. For three or more source keys, the result of XORing the first two
185+
keys is then XORed with the next key, and so forth.
186+
187+
{{< image filename="/images/dev/bitmap/BitopXor.svg" alt="Bitop XOR" >}}
188+
189+
{{< clients-example set="bitmap_tutorial" step="bitop_xor" >}}
190+
> BITOP XOR R A B
191+
(integer) 1
192+
> GET R
193+
"\xc1"
194+
# Hex value: 0xc1 = 0b11000001
195+
{{< /clients-example >}}
196+
197+
#### `NOT`
198+
199+
Set a bit in the destination key to 1 if it is not set in the source key (this
200+
is the only unary operator).
201+
202+
{{< image filename="/images/dev/bitmap/BitopNot.svg" alt="Bitop NOT" >}}
203+
204+
{{< clients-example set="bitmap_tutorial" step="bitop_not" >}}
205+
> BITOP NOT R A
206+
(integer) 1
207+
> GET R
208+
"'"
209+
# ASCII "'" (single quote) = hex 0x27 = 0b00100111
210+
{{< /clients-example >}}
211+
212+
#### `DIFF`
213+
214+
Set a bit in the destination key to 1 if it is set in the first source key, but not in any
215+
of the other source keys.
216+
217+
{{< image filename="/images/dev/bitmap/BitopDiff.svg" alt="Bitop DIFF" >}}
218+
219+
{{< clients-example set="bitmap_tutorial" step="bitop_diff" >}}
220+
> BITOP DIFF R A B C
221+
(integer) 1
222+
> GET R
223+
"\x80"
224+
# Hex value: 0x80 = 0b10000000
225+
{{< /clients-example >}}
226+
227+
#### `DIFF1`
228+
229+
Set a bit in the destination key to 1 if it is not set in the first source key,
230+
but set in at least one of the other source keys.
231+
232+
{{< image filename="/images/dev/bitmap/BitopDiff1.svg" alt="Bitop DIFF1" >}}
233+
234+
{{< clients-example set="bitmap_tutorial" step="bitop_diff1" >}}
235+
> BITOP DIFF1 R A B C
236+
(integer) 1
237+
> GET R
238+
"%"
239+
# ASCII "%" (percent) = hex 0x25 = 0b00100101
240+
{{< /clients-example >}}
241+
242+
#### `ANDOR`
243+
244+
Set a bit in the destination key to 1 if it is set in the first source key and also in at least one of the other source keys.
245+
246+
{{< image filename="/images/dev/bitmap/BitopAndOr.svg" alt="Bitop ANDOR" >}}
247+
248+
{{< clients-example set="bitmap_tutorial" step="bitop_andor" >}}
249+
> BITOP ANDOR R A B C
250+
(integer) 1
251+
> GET R
252+
"X"
253+
# ASCII "X" = hex 0x58 = 0b01011000
254+
{{< /clients-example >}}
255+
256+
#### `ONE`
257+
258+
Set a bit in the destination key to 1 if it is set in exactly one of the source keys.
259+
260+
{{< image filename="/images/dev/bitmap/BitopOne.svg" alt="Bitop ONE" >}}
261+
262+
{{< clients-example set="bitmap_tutorial" step="bitop_one" >}}
263+
> BITOP ONE R A B C
264+
(integer) 1
265+
> GET R
266+
"\xa5"
267+
# Hex value: 0xa5 = 0b10100101
268+
{{< /clients-example >}}
269+
270+
## Split bitmaps into multiple keys
271+
105272
Bitmaps are trivial to split into multiple keys, for example for
106273
the sake of sharding the data set and because in general it is better to
107274
avoid working with huge keys. To split a bitmap across different keys
108275
instead of setting all the bits into a key, a trivial strategy is just
109276
to store M bits per key and obtain the key name with `bit-number/M` and
110277
the Nth bit to address inside the key with `bit-number MOD M`.
111278

112-
113-
114279
## Performance
115280

116281
[`SETBIT`]({{< relref "/commands/setbit" >}}) and [`GETBIT`]({{< relref "/commands/getbit" >}}) are O(1).

content/develop/data-types/probabilistic/top-k.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ Insertion in a top-k has time complexity of O(K + depth) ≈ O(K) and lookup has
100100
- [HeavyKeeper: An Accurate Algorithm for Finding Top-k Elephant Flows.](https://yangtonghome.github.io/uploads/HeavyKeeper_ToN.pdf)
101101

102102
## References
103-
- [Meet Top-K: an Awesome Probabilistic Addition to RedisBloom](https://redis.com/blog/meet-top-k-awesome-probabilistic-addition-redisbloom/)
103+
- [Meet Top-K: an Awesome Probabilistic Addition to Redis](https://redis.com/blog/meet-top-k-awesome-probabilistic-addition-redis/)

content/develop/pubsub/keyspace-notifications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Different commands generate different kind of events according to the following
104104
* [`DEL`]({{< relref "/commands/del" >}}) generates a `del` event for every deleted key.
105105
* [`EXPIRE`]({{< relref "/commands/expire" >}}) and all its variants ([`PEXPIRE`]({{< relref "/commands/pexpire" >}}), [`EXPIREAT`]({{< relref "/commands/expireat" >}}), [`PEXPIREAT`]({{< relref "/commands/pexpireat" >}})) generate an `expire` event when called with a positive timeout (or a future timestamp). Note that when these commands are called with a negative timeout value or timestamp in the past, the key is deleted and only a `del` event is generated instead.
106106
* [`HDEL`]({{< relref "/commands/hdel" >}}) generates a single `hdel` event, and an additional `del` event if the resulting hash is empty and the key is removed.
107-
* [`HEXPIRE`]({{< relref "/commands/hexpire" >}}) and all its variants ([`HEXPIREAT`]({{< relref "/commands/hpexpireat" >}}), [`HPEXPIRE`]({{< relref "/commands/hpexpire" >}}), [`HPEXPIREAT`]({{< relref "/commands/hpexpireat" >}})) generate `hexpire` events. Furthermore, `hexpired` events are generated when fields expire.
107+
* [`HEXPIRE`]({{< relref "/commands/hexpire" >}}) and all its variants ([`HEXPIREAT`]({{< relref "/commands/hpexpireat" >}}), [`HPEXPIRE`]({{< relref "/commands/hpexpire" >}}), [`HPEXPIREAT`]({{< relref "/commands/hpexpireat" >}})) generate `hexpired` events. Furthermore, `hexpired` events are generated when fields expire.
108108
* [`HINCRBYFLOAT`]({{< relref "/commands/hincrbyfloat" >}}) generates an `hincrbyfloat` event.
109109
* [`HINCRBY`]({{< relref "/commands/hincrby" >}}) generates an `hincrby` event.
110110
* [`HPERSIST`]({{< relref "/commands/hpersist" >}}) generates an `hpersist` event.

content/develop/tools/cli.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ To launch the program in special modes, you can use several options, including:
2626

2727
This topic covers the different aspects of `redis-cli`, starting from the simplest and ending with the more advanced features.
2828

29+
## Install `redis-cli`
30+
31+
You have several options for installing or using `redis-cli`.
32+
33+
- [Install Redis Open Source]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}). The `redis-cli` utility is installed as part of each installation method.
34+
- [Build Redis from source]({{< relref "/operate/oss_and_stack/install/build-stack" >}}). Instead of building everything, you can just run the following command:
35+
36+
`$ make redis-cli`.
37+
38+
The `redis-cli` utility will be built in the `/path/to/redis-source/src` directory as `/path/to/redis-source/src/redis-cli`.
39+
40+
If you prefer not to install Redis, you can also run `redis-cli` in Docker. See the [Run `redis-cli` using Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker/#connect-with-redis-cli" >}}) page for instructions.
41+
2942
## Command line usage
3043

3144
To run a Redis command and return a standard output at the terminal, include the command to execute as separate arguments of `redis-cli`:

content/develop/whats-new/_index.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,109 @@ linkTitle: What's new?
1111
hideListLinks: true
1212
weight: 10
1313
---
14+
## Q2 2025 (April - June) Updates
15+
16+
### Tools
17+
18+
- Redis Insight [v2.70.1 release notes]({{< relref "/develop/tools/insight/release-notes/v.2.70.1" >}})
19+
- Redis Insight [v1.4.0 release notes]({{< relref "/develop/tools/insight/release-notes/v1.4.0" >}})
20+
- Updated [Redis Insight pages]({{< relref "/develop/tools/insight/_index" >}}) with consistent image-card layout
21+
- Added Redis Insight SVG icons and download links across [tools documentation]({{< relref "/develop/tools/_index" >}})
22+
23+
---
24+
25+
### Redis AI & Vectors
26+
27+
- Reorganized [search and query documentation]({{< relref "/develop/ai/search-and-query/_index" >}}) under AI section
28+
- Added [AI video tutorials]({{< relref "/develop/ai/ai-videos" >}}) with YouTube content
29+
- Added [AI notebook collection]({{< relref "/develop/ai/notebook-collection" >}}) with 8 new notebook links
30+
- Expanded vector examples across multiple clients:
31+
- [Python vector sets]({{< relref "/develop/clients/redis-py/vecsets" >}})
32+
- [Go vector sets]({{< relref "/develop/clients/go/vecsets" >}})
33+
- [JavaScript vector sets]({{< relref "/develop/clients/nodejs/vecsets" >}})
34+
- [Lettuce vector queries]({{< relref "/develop/clients/lettuce/vecsearch" >}})
35+
- [Lettuce vector sets]({{< relref "/develop/clients/lettuce/vecsets" >}})
36+
- Updated [redisvl documentation]({{< relref "/develop/ai/redisvl/_index" >}}) for versions 0.6.0-0.8.2
37+
- Added [LangCache SDK]({{< relref "/develop/ai/langcache/_index" >}}) documentation with [API reference]({{< relref "/develop/ai/langcache/api-examples" >}})
38+
39+
---
40+
41+
### Redis 8.0 & 8.2 Features
42+
43+
- [Redis Open Source 8.2 documentation]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisce/redisos-8.2-release-notes" >}})
44+
- Updated [Redis 8.0 release notes]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisce/redisos-8.0-release-notes" >}})
45+
- [Redis Query Engine expiration capabilities]({{< relref "/develop/ai/search-and-query/advanced-concepts/expiration" >}}) in Redis 8
46+
- Enhanced [TAG documentation]({{< relref "/develop/ai/search-and-query/advanced-concepts/tags" >}}) per GitHub issues
47+
- [Vector quantization and compression]({{< relref "/develop/ai/search-and-query/vectors/svs-compression" >}}) moved to dedicated page
48+
49+
---
50+
51+
### Data Types
52+
53+
- TimeSeries:
54+
- [Enhanced time series examples]({{< relref "/develop/data-types/timeseries/_index" >}}) with query and aggregation info
55+
- Added testable code examples (TCE) support
56+
- Probabilistic:
57+
- Added testable examples for [Python]({{< relref "/develop/clients/redis-py/prob/" >}}), [C#]({{< relref "/develop/clients/dotnet/prob/" >}}), [Java]({{< relref "/develop/clients/jedis/prob/" >}}), and [Go]({{< relref "/develop/clients/go/prob/" >}})
58+
- Updated [Cuckoo filter documentation]({{< relref "/develop/data-types/probabilistic/cuckoo-filter" >}})
59+
60+
---
61+
62+
### Client Libraries
63+
64+
#### Python (redis-py)
65+
- Added [reconnection examples]({{< relref "/develop/clients/redis-py/connect/#retrying-connections" >}})
66+
- Enhanced [timeout and retry details]({{< relref "/develop/clients/redis-py/produsage#timeouts" >}})
67+
- Fixed [pip install command]({{< relref "/develop/clients/redis-py/amr/" >}}) for redis-py entraid extension
68+
- Added [Binder environment links]({{< relref "/develop/clients/redis-py/_index#connect-and-test" >}}) for Python examples
69+
70+
#### Java (Jedis)
71+
- Updated to [latest Jedis version]({{< relref "/develop/clients/jedis/#install" >}})
72+
- Added [reconnection examples]({{< relref "/develop/clients/jedis/connect#retrying-a-command-after-a-connection-failure" >}})
73+
- Enhanced [probabilistic data type examples]({{< relref "/develop/clients/jedis/prob" >}})
74+
75+
#### Node.js
76+
- Added [command reliability information]({{< relref "/develop/clients/nodejs/produsage#command-execution-reliability" >}})
77+
- Fixed [reconnection details]({{< relref "/develop/clients/nodejs/connect#reconnect-after-disconnection" >}})
78+
79+
#### .NET (NRedisStack)
80+
- Added [retries and timeouts]({{< relref "/develop/clients/dotnet/produsage" >}}) to production usage advice
81+
- Enhanced [dialect 2 notes]({{< relref "/develop/clients/dotnet/queryjson" >}})
82+
83+
#### Go (go-redis)
84+
- Added [retries and timeouts]({{< relref "/develop/clients/go/produsage" >}}) to production usage
85+
- Enhanced [dialect 2 notes]({{< relref "/develop/clients/go/queryjson" >}})
86+
- Added [Connect with AMR]({{< relref "/develop/clients/go/amr" >}}) page.
87+
88+
#### Lettuce
89+
- Updated to [latest Lettuce version]({{< relref "/develop/clients/lettuce/_index#install" >}})
90+
- Added [command reliability information]({{< relref "/develop/clients/lettuce/produsage#connection-and-execution-reliability" >}})
91+
- Added [JSON query examples]({{< relref "/develop/clients/lettuce/queryjson" >}})
92+
93+
#### PHP (Predis)
94+
- Enhanced [dialect 2 notes]({{< relref "/develop/clients/php/queryjson" >}})
95+
96+
---
97+
98+
### Documentation Structure & Navigation
99+
100+
- Reorganized [develop section navigation]({{< relref "/develop/_index" >}}) with improved sidebar structure
101+
- Moved [programmability section]({{< relref "/develop/programmability/_index" >}}) into develop area
102+
- Relocated [patterns folder]({{< relref "/develop/clients/patterns/_index" >}}) to clients section
103+
- Added [Using commands section]({{< relref "/develop/using-commands/_index" >}}) to develop area
104+
- Enhanced [keyspace notifications]({{< relref "/develop/pubsub/keyspace-notifications" >}}) and [pub/sub]({{< relref "/develop/pubsub/_index" >}}) documentation
105+
- Updated [transactions]({{< relref "/develop/using-commands/transactions" >}}) and [pipeline]({{< relref "/develop/using-commands/pipelining/" >}}) pages
106+
- Added comprehensive aliases for backward compatibility
107+
108+
---
109+
110+
### Protocol & Technical Updates
111+
112+
- Fixed [RESP protocol specification]({{< relref "/develop/reference/protocol-spec" >}}) attribute byte documentation
113+
- Enhanced [FT.AGGREGATE expression precedence]({{< relref "/develop/ai/search-and-query/advanced-concepts/aggregations-syntax/" >}}) documentation
114+
- Updated [distributed locks]({{< relref "/develop/clients/patterns/distributed-locks" >}}) documentation
115+
- Fixed [FP32 vectorsets endianness]({{< relref "/develop/data-types/vector-sets#endianness-considerations-for-fp32-format" >}}) documentation
116+
14117
## Q1 2025 (January - March) Updates
15118

16119
### Tools

content/integrate/redis-data-integration/data-pipelines/transform-examples/redis-row-format.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,48 @@ output:
102102
expression: concat(['addresses-full', '#', values(key)[0]])
103103
language: jmespath
104104
```
105+
106+
### Important notes when using `row_format: full`
107+
108+
- The `before` object will be `null` for `insert` and `create` operations, and the `after` object will be `null` for `delete` operations. If you are building the output key manually, you should account for this and ensure that you are not trying to access fields from a `null` object, as shown in the example below:
109+
110+
```yaml
111+
source:
112+
table: addresses
113+
row_format: full
114+
115+
output:
116+
- uses: redis.write
117+
with:
118+
key:
119+
language: jmespath
120+
# The following pattern will fail for delete operations. In those cases `after` is null, the resulting key will
121+
# be 'addresses:None' and the key won't be removed from the target
122+
# expression: concat(['addresses:', after.ID])
123+
124+
# This pattern works for all operations, by using the ID from the `after` object if it is available,
125+
# and falling back to the ID from the `before` object if not.
126+
expression: concat(['addresses:', after.ID || before.ID])
127+
128+
# Another option is to use the ID from the `key` object
129+
# expression: concat(['addresses:', values(key)[0]])
130+
```
131+
132+
Please note that you should not use `key` in combination with `row_format: full` and more than one output, as the `key` object will be overwritten by the previous output. This is a known limitation of the current implementation and is subject to change in future versions.
133+
134+
135+
- The final result of the processing (which is what will be stored in the output) is the value of the `after` object. This means you must reference the fields using the `after` prefix unless you change the output structure in a transformation step. Also, when you add new fields, you must prefix them with `after.` to ensure that they are added to the correct part of the output:
136+
137+
```yaml
138+
source:
139+
table: addresses
140+
row_format: full
141+
142+
transform:
143+
- uses: add_field
144+
with:
145+
field: after.city_state # use this to add the new field to the final output
146+
# field: city_state # use this if you need a temporary field in the transformation steps, but not in the final output
147+
expression: concat([after.CITY, ', ', after.STATE])
148+
language: jmespath
149+
```

0 commit comments

Comments
 (0)