Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/commands/acl-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Each log entry is composed of the following fields:
5. `username`: The username that executed the command that caused the security events or the username that had a failed authentication attempt.
6. `age-seconds`: Age of the log entry in seconds.
7. `client-info`: Displays the client info of a client which caused one of the security events.
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were lost, if they fell between periods.
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were "lost", if they fell between periods.
9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created.
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cf.count.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ redis> CF.COUNT cf item2

## Return information

{{< multitabs id=cf-count-return-info"
{{< multitabs id="cf-count-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cf.del.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ redis> CF.DEL cf item2

## Return information

{{< multitabs id=cf-del-return-info"
{{< multitabs id="cf-del-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cf.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ redis> CF.INFO cf

One of the following:

{{< multitabs id=cf-info-return-info"
{{< multitabs id="cf-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cf.insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ redis> CF.INSERT cf2 ITEMS 1 1 1 1

## Return information

{{< multitabs id=cf-insert-return-info"
{{< multitabs id="cf-insert-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cf.insertnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ redis> CF.INSERTNX cf_new CAPACITY 1000 NOCREATE ITEMS item1 item2

## Return information

{{< multitabs id=cf-insert-return-info"
{{< multitabs id="cf-insert-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cluster-slot-stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The command reports on the following statistics:

## Return information

{{< multitabs id=cmd-name-return-info"
{{< multitabs id="cmd-name-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.incrby.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ redis> CMS.INCRBY test foo 10 bar 42

## Return information

{{< multitabs id=cms-incrby-return-info"
{{< multitabs id="cms-incrby-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ redis> CMS.INFO test

## Return information

{{< multitabs id=cms-info-return-info"
{{< multitabs id="cms-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.initbydim.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ OK

## Return information

{{< multitabs id=cms-initbydim-return-info"
{{< multitabs id="cms-initbydim-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.initbyprob.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ OK

## Return information

{{< multitabs id=cms-initbyprob-return-info"
{{< multitabs id="cms-initbyprob-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OK

## Return information

{{< multitabs id=cms-merge-return-info"
{{< multitabs id="cms-merge-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/cms.query.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ redis> CMS.QUERY test foo bar

## Return information

{{< multitabs id=cms-merge-return-info"
{{< multitabs id="cms-merge-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ It won't be included when `INFO` or `INFO ALL` are called, and it is returned on

Note: key memory usage is different on Redis Software or Redis Cloud active-active databases than on non-active-active databases. This is because memory usage includes some amount of CRDB overhead.

Additionally, for JSON keys, Redis implements a shared string mechanism to save memory when the same JSON field names or field values of type string are used more than once (either inter-key or intra-key).
Additionally, for JSON keys, Redis implements a "shared string" mechanism to save memory when the same JSON field names or field values of type string are used more than once (either inter-key or intra-key).
In such cases, instead of storing the field names or values many times, Redis stores them only once. This mechanism is not in place for active-active databases.

On non-active-active databases, `INFO` (Memory > used_memory) reports that the shared memory is counted, but only once for all keys. On active-active databases, there is no shared memory, so if strings are repeated, they are stored multiple times.
Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ redis> TDIGEST.ADD t string

## Return information

{{< multitabs id=tdigest-add-return-info"
{{< multitabs id="tdigest-add-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.byrank.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ redis> TDIGEST.BYRANK t 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

## Return information

{{< multitabs id=tdigest-byrank-return-info"
{{< multitabs id="tdigest-byrank-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.byrevrank.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ redis> TDIGEST.BYREVRANK t 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

## Return information

{{< multitabs id=tdigest-byrevrank-return-info"
{{< multitabs id="tdigest-byrevrank-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.cdf.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ redis> TDIGEST.CDF t 0 1 2 3 4 5 6

## Return information

{{< multitabs id=tdigest-cdf-return-info"
{{< multitabs id="tdigest-cdf-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.create.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ OK

## Return information

{{< multitabs id=tdigest-create-return-info"
{{< multitabs id="tdigest-create-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ redis> TDIGEST.INFO t

## Return information

{{< multitabs id=tdigest-info-return-info"
{{< multitabs id="tdigest-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.max.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ redis>TDIGEST.MAX t

## Return information

{{< multitabs id=tdigest-max-return-info"
{{< multitabs id="tdigest-max-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.merge.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ redis> TDIGEST.BYRANK sM 0 1 2 3 4

## Return information

{{< multitabs id=tdigest-merge-return-info"
{{< multitabs id="tdigest-merge-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.min.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ redis> TDIGEST.MIN t

## Return information

{{< multitabs id=tdigest-min-return-info"
{{< multitabs id="tdigest-min-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.quantile.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ redis> TDIGEST.QUANTILE t 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

## Return information

{{< multitabs id=tdigest-quantile-return-info"
{{< multitabs id="tdigest-quantile-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.rank.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ redis> TDIGEST.REVRANK s 10 20

## Return information

{{< multitabs id=tdigest-rank-return-info"
{{< multitabs id="tdigest-rank-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ OK

## Return information

{{< multitabs id=tdigest-reset-return-info"
{{< multitabs id="tdigest-reset-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.revrank.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ redis> TDIGEST.REVRANK s 10 20

## Return information

{{< multitabs id=tdigest-revrank-return-info"
{{< multitabs id="tdigest-revrank-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/tdigest.trimmed_mean.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ redis> TDIGEST.TRIMMED_MEAN t 0 1

## Return information

{{< multitabs id=tdigest-trimmedmean-return-info"
{{< multitabs id="tdigest-trimmedmean-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ redis> TOPK.ADD topk foo bar 42

## Return information

{{< multitabs id=topk-add-return-info"
{{< multitabs id="topk-add-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.count.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ redis> TOPK.COUNT topk foo 42 nonexist

## Return information

{{< multitabs id=topk-count-return-info"
{{< multitabs id="topk-count-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.incrby.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ redis> TOPK.INCRBY topk foo 3 bar 2 42 30

## Return information

{{< multitabs id=topk-incrby-return-info"
{{< multitabs id="topk-incrby-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ TOPK.INFO topk

## Return information

{{< multitabs id=topk-info-return-info"
{{< multitabs id="topk-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.list.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ TOPK.LIST topk WITHCOUNT

k (or less) items in the given Top-k sketch. The list is sorted by decreased count estimation.

{{< multitabs id=topk-info-return-info"
{{< multitabs id="topk-info-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.query.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ redis> TOPK.QUERY topk 42 nonexist

## Return information

{{< multitabs id=topk-query-return-info"
{{< multitabs id="topk-query-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
2 changes: 1 addition & 1 deletion content/commands/topk.reserve.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ OK

## Return information

{{< multitabs id=topk-reserve-return-info"
{{< multitabs id="topk-reserve-return-info"
tab1="RESP2"
tab2="RESP3" >}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ As of release 0.6, the implementation uses a multi-level range tree, saving rang

## Auto-complete and fuzzy suggestions

Another important feature for searching and querying is auto-completion or suggestion. It allows you to create dictionaries of weighted terms, and then query them for completion suggestions to a given user prefix. For example, if you put the term lcd tv into a dictionary, sending the prefix “lc” will return it as a result. The dictionary is modeled as a compressed trie (prefix tree) with weights, that is traversed to find the top suffixes of a prefix.
Another important feature for searching and querying is auto-completion or suggestion. It allows you to create dictionaries of weighted terms, and then query them for completion suggestions to a given user prefix. For example, if you put the term "lcd tv" into a dictionary, sending the prefix "lc" will return it as a result. The dictionary is modeled as a compressed trie (prefix tree) with weights, that is traversed to find the top suffixes of a prefix.

Redis Open Source also allows for fuzzy suggestions, meaning you can get suggestions to user prefixes even if the user has a typo in the prefix. This is enabled using a Levenshtein automaton, allowing efficient searching of a dictionary for all terms within a maximal Levenshtein distance of a term or prefix. Suggestions are weighted based on both their original score and their distance from a prefix typed by the user. Only suggestions where the prefix is up to one Levenshtein distance away from the typed prefix are supported for performance reasons.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ Highlighting will highlight the found term and its variants with a user-defined

Another important feature for Redis Open Source is its autocomplete engine. This allows users to create dictionaries of weighted terms, and then query them for completion suggestions to a given user prefix. Completions can have payloads, which are user-provided pieces of data that can be used for display. For example, completing the names of users, it is possible to add extra metadata about users to be displayed.

For example, if a user starts to put the term lcd tv into a dictionary, sending the prefix “lc” will return the full term as a result. The dictionary is modeled as a compact trie (prefix tree) with weights, which is traversed to find the top suffixes of a prefix.
For example, if a user starts to put the term "lcd tv" into a dictionary, sending the prefix "lc" will return the full term as a result. The dictionary is modeled as a compact trie (prefix tree) with weights, which is traversed to find the top suffixes of a prefix.

Redis also allows fuzzy suggestions, meaning you can get suggestions to prefixes even if the user makes a typo in their prefix. This is enabled using a Levenshtein automaton, allowing efficient searching of the dictionary for all terms within a maximal Levenshtein distance of a term or prefix. Suggestions are then weighted based on both their original score and their distance from the prefix typed by the user.

Expand Down
2 changes: 1 addition & 1 deletion content/develop/clients/dotnet/vecsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ for more information.

```csharp
private static byte[] GetEmbeddingFromAzure(string sentence){
Uri oaiEndpoint = new ("your-azure-openai-endpoint);
Uri oaiEndpoint = new ("your-azure-openai-endpoint");
string oaiKey = "your-openai-key";

AzureKeyCredential credentials = new (oaiKey);
Expand Down
4 changes: 2 additions & 2 deletions content/develop/clients/patterns/distributed-locks.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To acquire the lock, the way to go is the following:
SET resource_name my_random_value NX PX 30000

The command will set the key only if it does not already exist (`NX` option), with an expire of 30000 milliseconds (`PX` option).
The key is set to a value my\_random\_value. This value must be unique across all clients and all lock requests.
The key is set to a value "my\_random\_value". This value must be unique across all clients and all lock requests.

Basically the random value is used in order to release the lock in a safe way, with a script that tells Redis: remove the key only if it exists and the value stored at the key is exactly the one I expect to be. This is accomplished by the following Lua script:

Expand All @@ -107,7 +107,7 @@ Basically the random value is used in order to release the lock in a safe way, w
end

This is important in order to avoid removing a lock that was created by another client. For example a client may acquire the lock, get blocked performing some operation for longer than the lock validity time (the time at which the key will expire), and later remove the lock, that was already acquired by some other client.
Using just [`DEL`]({{< relref "/commands/del" >}}) is not safe as a client may remove another client's lock. With the above script instead every lock is signed with a random string, so the lock will be removed only if it is still the one that was set by the client trying to remove it.
Using just [`DEL`]({{< relref "/commands/del" >}}) is not safe as a client may remove another client's lock. With the above script instead every lock is "signed" with a random string, so the lock will be removed only if it is still the one that was set by the client trying to remove it.

What should this random string be? We assume it’s 20 bytes from `/dev/urandom`, but you can find cheaper ways to make it unique enough for your tasks.
For example a safe pick is to seed RC4 with `/dev/urandom`, and generate a pseudo random stream from that.
Expand Down
2 changes: 1 addition & 1 deletion content/develop/data-types/json/resp3.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This page provides a brief comparison between RESP2 and RESP3 responses for JSON

### JSON command replies comparison

The types are described using a [TypeScript-like syntax](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html). `Array<a>` denotes an [array](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays) where the type of elements is known, but the number of elements is not.
The types are described using a ["TypeScript-like" syntax](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html). `Array<a>` denotes an [array](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#arrays) where the type of elements is known, but the number of elements is not.

| Command | RESP2 | RESP3 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
Loading