diff --git a/content/commands/acl-cat/index.md b/content/commands/acl-cat/index.md index 78711b8739..048968face 100644 --- a/content/commands/acl-cat/index.md +++ b/content/commands/acl-cat/index.md @@ -72,6 +72,14 @@ Checking for all the available categories is as simple as: 19) "connection" 20) "transaction" 21) "scripting" +22) "json" +23) "search" +24) "tdigest" +25) "cms" +26) "bloom" +27) "cuckoo" +28) "topk" +29) "timeseries" ``` Then we may want to know what commands are part of a given category: diff --git a/content/commands/bf.add/index.md b/content/commands/bf.add/index.md index e7f4145534..39d0068a71 100644 --- a/content/commands/bf.add/index.md +++ b/content/commands/bf.add/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.card/index.md b/content/commands/bf.card/index.md index b1f6c77814..91ef5478cc 100644 --- a/content/commands/bf.card/index.md +++ b/content/commands/bf.card/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/bf.exists/index.md b/content/commands/bf.exists/index.md index 9d9694dee7..0722599d12 100644 --- a/content/commands/bf.exists/index.md +++ b/content/commands/bf.exists/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.info/index.md b/content/commands/bf.info/index.md index feccbb3717..83db39b374 100644 --- a/content/commands/bf.info/index.md +++ b/content/commands/bf.info/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/bf.insert/index.md b/content/commands/bf.insert/index.md index 4efb8e0227..c16bf116b3 100644 --- a/content/commands/bf.insert/index.md +++ b/content/commands/bf.insert/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.loadchunk/index.md b/content/commands/bf.loadchunk/index.md index 078454d5cc..79981541f4 100644 --- a/content/commands/bf.loadchunk/index.md +++ b/content/commands/bf.loadchunk/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.madd/index.md b/content/commands/bf.madd/index.md index 76c9f7d01d..46e6efd742 100644 --- a/content/commands/bf.madd/index.md +++ b/content/commands/bf.madd/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.mexists/index.md b/content/commands/bf.mexists/index.md index ff6732a5b5..42cf64dcad 100644 --- a/content/commands/bf.mexists/index.md +++ b/content/commands/bf.mexists/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/bf.reserve/index.md b/content/commands/bf.reserve/index.md index b23bfd77ac..07f4d77e65 100644 --- a/content/commands/bf.reserve/index.md +++ b/content/commands/bf.reserve/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/bf.scandump/index.md b/content/commands/bf.scandump/index.md index 2a03a7610f..7305827419 100644 --- a/content/commands/bf.scandump/index.md +++ b/content/commands/bf.scandump/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@bloom' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.add/index.md b/content/commands/cf.add/index.md index e706961217..aa69b74f30 100644 --- a/content/commands/cf.add/index.md +++ b/content/commands/cf.add/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.addnx/index.md b/content/commands/cf.addnx/index.md index 1b3bf2049c..180bb86da3 100644 --- a/content/commands/cf.addnx/index.md +++ b/content/commands/cf.addnx/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.count/index.md b/content/commands/cf.count/index.md index 766b8d81af..db3fc93a2f 100644 --- a/content/commands/cf.count/index.md +++ b/content/commands/cf.count/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.del/index.md b/content/commands/cf.del/index.md index e39b6eb25c..696326edcd 100644 --- a/content/commands/cf.del/index.md +++ b/content/commands/cf.del/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.exists/index.md b/content/commands/cf.exists/index.md index 43bc2a9380..0758301cb9 100644 --- a/content/commands/cf.exists/index.md +++ b/content/commands/cf.exists/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.info/index.md b/content/commands/cf.info/index.md index 804060b990..e52d7eb626 100644 --- a/content/commands/cf.info/index.md +++ b/content/commands/cf.info/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/cf.insert/index.md b/content/commands/cf.insert/index.md index b869e3a841..e3ae06283e 100644 --- a/content/commands/cf.insert/index.md +++ b/content/commands/cf.insert/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.insertnx/index.md b/content/commands/cf.insertnx/index.md index 632d0cfe8d..2bb315f1de 100644 --- a/content/commands/cf.insertnx/index.md +++ b/content/commands/cf.insertnx/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.loadchunk/index.md b/content/commands/cf.loadchunk/index.md index 81d728bda7..778472f2e4 100644 --- a/content/commands/cf.loadchunk/index.md +++ b/content/commands/cf.loadchunk/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.mexists/index.md b/content/commands/cf.mexists/index.md index 2e9539f2e6..b11d996be0 100644 --- a/content/commands/cf.mexists/index.md +++ b/content/commands/cf.mexists/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/cf.reserve/index.md b/content/commands/cf.reserve/index.md index bbeeca3abb..31ded4178e 100644 --- a/content/commands/cf.reserve/index.md +++ b/content/commands/cf.reserve/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/cf.scandump/index.md b/content/commands/cf.scandump/index.md index 26f59c52b8..4a61c90182 100644 --- a/content/commands/cf.scandump/index.md +++ b/content/commands/cf.scandump/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cuckoo' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/client-list/index.md b/content/commands/client-list/index.md index 53cb326121..f1e5941e42 100644 --- a/content/commands/client-list/index.md +++ b/content/commands/client-list/index.md @@ -116,6 +116,7 @@ Here is the meaning of the fields: * `resp`: client RESP protocol version. Added in Redis 7.0 * `rbp`: peak size of the client's read buffer since the client connected. Added in Redis 7.0 * `rbs`: current size of the client's read buffer in bytes. Added in Redis 7.0 +* `io-thread`: id of I/O thread assigned to the client. Added in Redis 8.0 The client flags can be a combination of: diff --git a/content/commands/cms.incrby/index.md b/content/commands/cms.incrby/index.md index 07cf7ac8c7..f62c0e81f1 100644 --- a/content/commands/cms.incrby/index.md +++ b/content/commands/cms.incrby/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@cms' +- '@write' arguments: - name: key type: key diff --git a/content/commands/cms.info/index.md b/content/commands/cms.info/index.md index baee931a51..bd08c54786 100644 --- a/content/commands/cms.info/index.md +++ b/content/commands/cms.info/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cms' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/cms.initbydim/index.md b/content/commands/cms.initbydim/index.md index 1a15d963e0..dc847824e3 100644 --- a/content/commands/cms.initbydim/index.md +++ b/content/commands/cms.initbydim/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cms' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/cms.initbyprob/index.md b/content/commands/cms.initbyprob/index.md index 3e5c74fe5b..8e4fda5723 100644 --- a/content/commands/cms.initbyprob/index.md +++ b/content/commands/cms.initbyprob/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@cms' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/cms.merge/index.md b/content/commands/cms.merge/index.md index 9080e05e0f..44cf69b154 100644 --- a/content/commands/cms.merge/index.md +++ b/content/commands/cms.merge/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@cms' +- '@write' arguments: - name: destination type: key diff --git a/content/commands/cms.query/index.md b/content/commands/cms.query/index.md index 499a67e06b..7a5a36746b 100644 --- a/content/commands/cms.query/index.md +++ b/content/commands/cms.query/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@cms' +- '@read' arguments: - name: key type: key diff --git a/content/commands/ft._list/index.md b/content/commands/ft._list/index.md index e1d3ad4c60..8599080c2d 100644 --- a/content/commands/ft._list/index.md +++ b/content/commands/ft._list/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@admin' +- '@search' +- '@slow' categories: - docs - develop diff --git a/content/commands/ft.aggregate/index.md b/content/commands/ft.aggregate/index.md index f1e702bb18..d31185826e 100644 --- a/content/commands/ft.aggregate/index.md +++ b/content/commands/ft.aggregate/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@fast' arguments: - name: index type: string @@ -205,7 +209,11 @@ syntax_str: "query [VERBATIM] [LOAD\_count field [field ...]] [TIMEOUT\_timeout] title: FT.AGGREGATE --- -Run a search query on an index, and perform aggregate transformations on the results, extracting statistics etc from them +Run a search query on an index and perform aggregate transformations on the results. + +{{< note >}} +This command will only return keys to which the user has read access. +{{< /note >}} [Examples](#examples) diff --git a/content/commands/ft.aliasadd/index.md b/content/commands/ft.aliasadd/index.md index 34441868f0..2bd5fa460b 100644 --- a/content/commands/ft.aliasadd/index.md +++ b/content/commands/ft.aliasadd/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasdel/index.md b/content/commands/ft.aliasdel/index.md index 4ea8da05c4..9989302a70 100644 --- a/content/commands/ft.aliasdel/index.md +++ b/content/commands/ft.aliasdel/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasupdate/index.md b/content/commands/ft.aliasupdate/index.md index d5e55af55d..3d877f7705 100644 --- a/content/commands/ft.aliasupdate/index.md +++ b/content/commands/ft.aliasupdate/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: alias type: string diff --git a/content/commands/ft.alter/index.md b/content/commands/ft.alter/index.md index 6471225727..6b2c25010c 100644 --- a/content/commands/ft.alter/index.md +++ b/content/commands/ft.alter/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.config-get/index.md b/content/commands/ft.config-get/index.md index 783105a2e4..362d2f9e65 100644 --- a/content/commands/ft.config-get/index.md +++ b/content/commands/ft.config-get/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@admin' +- '@search' arguments: - name: option type: string @@ -15,17 +18,19 @@ categories: command_flags: - readonly complexity: O(1) +deprecated_since: 8.0.0 description: Retrieves runtime configuration options +doc_flags: +- deprecated group: search hidden: false linkTitle: FT.CONFIG GET module: Search +replaced_by: '[`CONFIG GET`]({{< relref "/commands/config-get" >}})' since: 1.0.0 stack_path: docs/interact/search-and-query summary: Retrieves runtime configuration options -syntax: 'FT.CONFIG GET option - - ' +syntax: FT.CONFIG GET option syntax_fmt: FT.CONFIG GET option syntax_str: '' title: FT.CONFIG GET diff --git a/content/commands/ft.config-help/index.md b/content/commands/ft.config-help/index.md index f6548535df..5a22c6ce4f 100644 --- a/content/commands/ft.config-help/index.md +++ b/content/commands/ft.config-help/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@admin' +- '@search' arguments: - name: option type: string diff --git a/content/commands/ft.config-set/index.md b/content/commands/ft.config-set/index.md index 54a6d6aec4..c6336b683f 100644 --- a/content/commands/ft.config-set/index.md +++ b/content/commands/ft.config-set/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@admin' +- '@search' arguments: - name: option type: string @@ -15,17 +18,19 @@ categories: - kubernetes - clients complexity: O(1) +deprecated_since: 8.0.0 description: Sets runtime configuration options +doc_flags: +- deprecated group: search hidden: false linkTitle: FT.CONFIG SET module: Search +replaced_by: '[`CONFIG SET`]({{< relref "/commands/config-set" >}})' since: 1.0.0 stack_path: docs/interact/search-and-query summary: Sets runtime configuration options -syntax: 'FT.CONFIG SET option value - - ' +syntax: FT.CONFIG SET option value syntax_fmt: FT.CONFIG SET option value syntax_str: value title: FT.CONFIG SET @@ -35,7 +40,7 @@ Set the value of a RediSearch configuration parameter. Values set using `FT.CONFIG SET` are not persisted after server restart. -RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}). +RediSearch configuration parameters are detailed in [Configuration parameters]({{< relref "/develop/interact/search-and-query/administration/configuration" >}}). {{% alert title="Note" color="warning" %}} As detailed in the link above, not all RediSearch configuration parameters can be set at runtime. diff --git a/content/commands/ft.create/index.md b/content/commands/ft.create/index.md index d417aac062..9a367d7dbd 100644 --- a/content/commands/ft.create/index.md +++ b/content/commands/ft.create/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.cursor-del/index.md b/content/commands/ft.cursor-del/index.md index d143e45505..00206978f6 100644 --- a/content/commands/ft.cursor-del/index.md +++ b/content/commands/ft.cursor-del/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@read' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.cursor-read/index.md b/content/commands/ft.cursor-read/index.md index 1fbd5676fb..f603685efa 100644 --- a/content/commands/ft.cursor-read/index.md +++ b/content/commands/ft.cursor-read/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@read' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.dictadd/index.md b/content/commands/ft.dictadd/index.md index 7c28c07f38..d22931081b 100644 --- a/content/commands/ft.dictadd/index.md +++ b/content/commands/ft.dictadd/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdel/index.md b/content/commands/ft.dictdel/index.md index 2409aac75c..0f1b3ac522 100644 --- a/content/commands/ft.dictdel/index.md +++ b/content/commands/ft.dictdel/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdump/index.md b/content/commands/ft.dictdump/index.md index 8c4e6a33d0..b96d77d284 100644 --- a/content/commands/ft.dictdump/index.md +++ b/content/commands/ft.dictdump/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: dict type: string diff --git a/content/commands/ft.dropindex/index.md b/content/commands/ft.dropindex/index.md index 34f875b047..44769bfd89 100644 --- a/content/commands/ft.dropindex/index.md +++ b/content/commands/ft.dropindex/index.md @@ -1,4 +1,9 @@ --- +acl_categories: +- '@dangerous' +- '@search' +- '@slow' +- '@write' arguments: - name: index type: string @@ -83,4 +88,3 @@ OK ## Related topics [RediSearch]({{< relref "/develop/interact/search-and-query/" >}}) - diff --git a/content/commands/ft.explain/index.md b/content/commands/ft.explain/index.md index 2e3e192e8c..924e7e323f 100644 --- a/content/commands/ft.explain/index.md +++ b/content/commands/ft.explain/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.explaincli/index.md b/content/commands/ft.explaincli/index.md index 16af7cb94b..0501eaef88 100644 --- a/content/commands/ft.explaincli/index.md +++ b/content/commands/ft.explaincli/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.info/index.md b/content/commands/ft.info/index.md index 41067e0821..009e2c53c4 100644 --- a/content/commands/ft.info/index.md +++ b/content/commands/ft.info/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.profile/index.md b/content/commands/ft.profile/index.md index 2d9b646067..c2ca68a1a2 100644 --- a/content/commands/ft.profile/index.md +++ b/content/commands/ft.profile/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@read' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.search/index.md b/content/commands/ft.search/index.md index 76776103da..0570e37bfa 100644 --- a/content/commands/ft.search/index.md +++ b/content/commands/ft.search/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@read' +- '@search' arguments: - name: index type: string @@ -312,7 +315,11 @@ syntax_str: "query [NOCONTENT] [VERBATIM] [NOSTOPWORDS] [WITHSCORES] [WITHPAYLOA title: FT.SEARCH --- -Search the index with a textual query, returning either documents or just ids +Search the index with a textual query, returning either documents or just ids. + +{{< note >}} +This command will only return keys to which the user has read access. +{{< /note >}} [Examples](#examples) diff --git a/content/commands/ft.spellcheck/index.md b/content/commands/ft.spellcheck/index.md index ab9cc21dad..77d1e3368b 100644 --- a/content/commands/ft.spellcheck/index.md +++ b/content/commands/ft.spellcheck/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.sugadd/index.md b/content/commands/ft.sugadd/index.md index 74bb63830d..8aacb6a174 100644 --- a/content/commands/ft.sugadd/index.md +++ b/content/commands/ft.sugadd/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@write' arguments: - name: key type: string diff --git a/content/commands/ft.sugdel/index.md b/content/commands/ft.sugdel/index.md index d10ce83908..581e57a4bf 100644 --- a/content/commands/ft.sugdel/index.md +++ b/content/commands/ft.sugdel/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@write' arguments: - name: key type: string diff --git a/content/commands/ft.sugget/index.md b/content/commands/ft.sugget/index.md index 474f1a8746..90d7f48fde 100644 --- a/content/commands/ft.sugget/index.md +++ b/content/commands/ft.sugget/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: key type: string diff --git a/content/commands/ft.suglen/index.md b/content/commands/ft.suglen/index.md index b06b84dbe8..d91ad22aa5 100644 --- a/content/commands/ft.suglen/index.md +++ b/content/commands/ft.suglen/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: key type: string diff --git a/content/commands/ft.syndump/index.md b/content/commands/ft.syndump/index.md index 1cf3a1c113..e86af817e8 100644 --- a/content/commands/ft.syndump/index.md +++ b/content/commands/ft.syndump/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.synupdate/index.md b/content/commands/ft.synupdate/index.md index 42ddd048f7..bd59f7bfa8 100644 --- a/content/commands/ft.synupdate/index.md +++ b/content/commands/ft.synupdate/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.tagvals/index.md b/content/commands/ft.tagvals/index.md index 75f6a8134c..43f7768146 100644 --- a/content/commands/ft.tagvals/index.md +++ b/content/commands/ft.tagvals/index.md @@ -1,4 +1,9 @@ --- +acl_categories: +- '@dangerous' +- '@read' +- '@search' +- '@slow' arguments: - name: index type: string @@ -18,6 +23,8 @@ command_flags: - readonly complexity: O(N) description: Returns the distinct tags indexed in a Tag field +doc_flags: +- deprecated group: search hidden: false linkTitle: FT.TAGVALS diff --git a/content/commands/hgetdel/index.md b/content/commands/hgetdel/index.md new file mode 100644 index 0000000000..93cadb98b5 --- /dev/null +++ b/content/commands/hgetdel/index.md @@ -0,0 +1,88 @@ +--- +acl_categories: +- '@write' +- '@hash' +- '@fast' +arguments: +- display_text: key + key_spec_index: 0 + name: key + type: key +- arguments: + - display_text: numfields + name: numfields + type: integer + - display_text: field + multiple: true + name: field + type: string + name: fields + token: FIELDS + type: block +arity: -5 +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +command_flags: +- write +- fast +complexity: O(N) where N is the number of specified fields +description: Returns the value of a field and deletes it from the hash. +group: hash +hidden: false +key_specs: +- RW: true + access: true + begin_search: + spec: + index: 1 + type: index + delete: true + find_keys: + spec: + keystep: 1 + lastkey: 0 + limit: 0 + type: range +linkTitle: HGETDEL +since: 8.0.0 +summary: Returns the value of a field and deletes it from the hash. +syntax_fmt: "HGETDEL key FIELDS\_numfields field [field ...]" +syntax_str: "FIELDS\_numfields field [field ...]" +title: HGETDEL +--- +Get and delete the value of one or more fields of a given hash key. When the last field is deleted, the key will also be deleted. + +## Example + +``` +redis> HSET mykey field1 "Hello" field2 "World" field3 "!" +(integer) 3 +redis> HGETALL mykey +1) "field1" +2) "Hello" +3) "field2" +4) "World" +5) "field3" +6) "!" +redis> HGETDEL mykey FIELDS 2 field3 field4 +1) "!" +2) (nil) +redis> HGETALL mykey +1) "field1" +2) "Hello" +3) "field2" +4) "World" +redis> HGETDEL mykey FIELDS 2 field1 field2 +1) "Hello" +2) "World" +redis> KEYS * +(empty array) +``` diff --git a/content/commands/hgetdel/syntax.svg b/content/commands/hgetdel/syntax.svg new file mode 100644 index 0000000000..5687b8db0c --- /dev/null +++ b/content/commands/hgetdel/syntax.svg @@ -0,0 +1,20 @@ + + + + + + +HEXPIRE +keykey +secondsinteger + + + +XX +NX +GT +LT +numfieldsinteger + +fieldstring + \ No newline at end of file diff --git a/content/commands/hgetex/index.md b/content/commands/hgetex/index.md new file mode 100644 index 0000000000..355af773d7 --- /dev/null +++ b/content/commands/hgetex/index.md @@ -0,0 +1,128 @@ +--- +acl_categories: +- '@write' +- '@hash' +- '@fast' +arguments: +- display_text: key + key_spec_index: 0 + name: key + type: key +- arguments: + - display_text: seconds + name: seconds + token: EX + type: integer + - display_text: milliseconds + name: milliseconds + token: PX + type: integer + - display_text: unix-time-seconds + name: unix-time-seconds + token: EXAT + type: unix-time + - display_text: unix-time-milliseconds + name: unix-time-milliseconds + token: PXAT + type: unix-time + - display_text: persist + name: persist + token: PERSIST + type: pure-token + name: expiration + optional: true + type: oneof +- arguments: + - display_text: numfields + name: numfields + type: integer + - display_text: field + multiple: true + name: field + type: string + name: fields + token: FIELDS + type: block +arity: -5 +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +command_flags: +- write +- fast +complexity: O(N) where N is the number of specified fields +description: Get the value of one or more fields of a given hash key, and optionally + set their expiration. +group: hash +hidden: false +key_specs: +- RW: true + access: true + begin_search: + spec: + index: 1 + type: index + find_keys: + spec: + keystep: 1 + lastkey: 0 + limit: 0 + type: range + notes: RW and UPDATE because it changes the TTL + update: true +linkTitle: HGETEX +since: 8.0.0 +summary: Get the value of one or more fields of a given hash key, and optionally set + their expiration. +syntax_fmt: "HGETEX key [EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds\ + \ |\n PXAT\_unix-time-milliseconds | PERSIST] FIELDS\_numfields field\n [field\ + \ ...]" +syntax_str: "[EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds | PXAT\_unix-time-milliseconds\ + \ | PERSIST] FIELDS\_numfields field [field ...]" +title: HGETEX +--- + +Get the value of one or more fields of a given hash key and optionally set their expiration time or time-to-live (TTL). + +## Options + +The `HGETEX` command supports a set of options: + +* `EX seconds` -- Set the specified expiration time, in seconds. +* `PX milliseconds` -- Set the specified expiration time, in milliseconds. +* `EXAT unix-time-seconds` -- Set the specified Unix time at which the fields will expire, in seconds. +* `PXAT unix-time-milliseconds` -- Set the specified Unix time at which the fields will expire, in milliseconds. +* `PERSIST` -- Remove the TTL associated with the fields. + +The `EX`, `PX`, `EXAT`, `PXAT`, and `PERSIST` options are mutually exclusive. + +## Example + +``` +redis> HSET mykey field1 "Hello" field2 "World" +(integer) 2 +redis> HGETEX mykey EX 120 FIELDS 1 field1 +1) "Hello" +redis> HGETEX mykey EX 100 FIELDS 1 field2 +1) "World" +redis> HTTL mykey FIELDS 2 field1 field2 +1) (integer) 91 +2) (integer) 85 +redis> HTTL mykey FIELDS 3 field1 field2 field3 +1) (integer) 75 +2) (integer) 68 +3) (integer) -2 +... +redis> HTTL mykey FIELDS 3 field1 field2 +1) (integer) -2 +2) (integer) -2 +redis> HGETALL mykey +(empty array) +``` diff --git a/content/commands/hgetex/syntax.svg b/content/commands/hgetex/syntax.svg new file mode 100644 index 0000000000..5687b8db0c --- /dev/null +++ b/content/commands/hgetex/syntax.svg @@ -0,0 +1,20 @@ + + + + + + +HEXPIRE +keykey +secondsinteger + + + +XX +NX +GT +LT +numfieldsinteger + +fieldstring + \ No newline at end of file diff --git a/content/commands/hsetex/index.md b/content/commands/hsetex/index.md new file mode 100644 index 0000000000..6393284d18 --- /dev/null +++ b/content/commands/hsetex/index.md @@ -0,0 +1,143 @@ +--- +acl_categories: +- '@write' +- '@hash' +- '@fast' +arguments: +- display_text: key + key_spec_index: 0 + name: key + type: key +- arguments: + - display_text: fnx + name: fnx + token: FNX + type: pure-token + - display_text: fxx + name: fxx + token: FXX + type: pure-token + name: condition + optional: true + type: oneof +- arguments: + - display_text: seconds + name: seconds + token: EX + type: integer + - display_text: milliseconds + name: milliseconds + token: PX + type: integer + - display_text: unix-time-seconds + name: unix-time-seconds + token: EXAT + type: unix-time + - display_text: unix-time-milliseconds + name: unix-time-milliseconds + token: PXAT + type: unix-time + - display_text: keepttl + name: keepttl + token: KEEPTTL + type: pure-token + name: expiration + optional: true + type: oneof +- arguments: + - display_text: numfields + name: numfields + type: integer + - arguments: + - display_text: field + name: field + type: string + - display_text: value + name: value + type: string + multiple: true + name: data + type: block + name: fields + token: FIELDS + type: block +arity: -6 +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +command_flags: +- write +- denyoom +- fast +complexity: O(N) where N is the number of fields being set. +description: Set the value of one or more fields of a given hash key, and optionally + set their expiration. +group: hash +hidden: false +key_specs: +- RW: true + begin_search: + spec: + index: 1 + type: index + find_keys: + spec: + keystep: 1 + lastkey: 0 + limit: 0 + type: range + update: true +linkTitle: HSETEX +since: 8.0.0 +summary: Set the value of one or more fields of a given hash key, and optionally set + their expiration. +syntax_fmt: "HSETEX key [FNX | FXX] [EX\_seconds | PX\_milliseconds |\n EXAT\_unix-time-seconds\ + \ | PXAT\_unix-time-milliseconds | KEEPTTL]\n FIELDS\_numfields field value [field\ + \ value ...]" +syntax_str: "[FNX | FXX] [EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds\ + \ | PXAT\_unix-time-milliseconds | KEEPTTL] FIELDS\_numfields field value [field\ + \ value ...]" +title: HSETEX +--- + +Set the value of one or more fields of a given hash key, and optionally set their expiration time or time-to-live (TTL). + +## Options + +The `HGETEX` command supports a set of options: + +* `FNX` -- Only set the fields if none of them already exist. +* `FXX` -- Only set the fields if all of them already exist. +* `EX seconds` -- Set the specified expiration time in seconds. +* `PX milliseconds` -- Set the specified expiration time in milliseconds. +* `EXAT unix-time-seconds` -- Set the specified Unix time in seconds at which the fields will expire. +* `PXAT unix-time-milliseconds` -- Set the specified Unix time in milliseconds at which the fields will expire. +* `KEEPTTL` -- Retain the TTL associated with the fields. + +The `EX`, `PX`, `EXAT`, `PXAT`, and `KEEPTTL` options are mutually exclusive. + +## Example + +``` +redis> HSETEX mykey EXAT 1740470400 FIELDS 2 field1 "Hello" field2 "World" +(integer) 1 +redis> HTTL mykey FIELDS 2 field1 field2 +1) (integer) 55627 +2) (integer) 55627 +redis> HSETEX mykey FNX EX 60 FIELDS 2 field1 "Hello" field2 "World" +(integer) 0 +redis> HSETEX mykey FXX EX 60 KEEPTTL FIELDS 2 field1 "hello" field2 "world" +(error) ERR Only one of EX, PX, EXAT, PXAT or KEEPTTL arguments can be specified +redis> HSETEX mykey FXX KEEPTTL FIELDS 2 field1 "hello" field2 "world" +(integer) 1 +redis> HTTL mykey FIELDS 2 field1 field2 +1) (integer) 55481 +2) (integer) 55481 +``` diff --git a/content/commands/hsetex/syntax.svg b/content/commands/hsetex/syntax.svg new file mode 100644 index 0000000000..5687b8db0c --- /dev/null +++ b/content/commands/hsetex/syntax.svg @@ -0,0 +1,20 @@ + + + + + + +HEXPIRE +keykey +secondsinteger + + + +XX +NX +GT +LT +numfieldsinteger + +fieldstring + \ No newline at end of file diff --git a/content/commands/info/index.md b/content/commands/info/index.md index 1be9568378..5806e28086 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -49,6 +49,7 @@ The optional parameter can be used to select a specific section of information: * `clients`: Client connections section * `memory`: Memory consumption related information * `persistence`: RDB and AOF related information +* `threads`: I/O threads information * `stats`: General statistics * `replication`: Master/replica replication information * `cpu`: CPU consumption statistics @@ -299,6 +300,15 @@ If a load operation is on-going, these additional fields will be added: * `loading_loaded_perc`: Same value expressed as a percentage * `loading_eta_seconds`: ETA in seconds for the load to be complete +The **threads** section provides statistics on I/O threads. + The statistics are the number of assigned clients, + the number of read events processed, and the number of write events processed. + Added in Redis 8.0. + +For each I/O thread, the following line is added: + +* `io_thread_XXX`: `clients=XXX,reads=XXX,writes=XXX` + Here is the meaning of all fields in the **stats** section: * `total_connections_received`: Total number of connections accepted by the @@ -362,8 +372,8 @@ Here is the meaning of all fields in the **stats** section: * `dump_payload_sanitizations`: Total number of dump payload deep integrity validations (see `sanitize-dump-payload` config). * `total_reads_processed`: Total number of read events processed * `total_writes_processed`: Total number of write events processed -* `io_threaded_reads_processed`: Number of read events processed by the main and I/O threads -* `io_threaded_writes_processed`: Number of write events processed by the main and I/O threads +* `io_threaded_reads_processed`: Number of read events processed by I/O threads +* `io_threaded_writes_processed`: Number of write events processed by I/O threads * `client_query_buffer_limit_disconnections`: Total number of disconnections due to client reaching query buffer limit * `client_output_buffer_limit_disconnections`: Total number of disconnections due to client reaching output buffer limit * `reply_buffer_shrinks`: Total number of output buffer shrinks @@ -497,6 +507,23 @@ The **modules** section contains additional information about loaded modules if **RediSearch fields** +* `search_gc_bytes_collected`: The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes. [3](#tnote-3) +* `search_bytes_collected`: The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes. Deprecated in 8.0 (renamed `search_gc_bytes_collected`), but still available in older versions. [1](#tnote-1) +* `search_gc_marked_deleted_vectors`: The number of vectors marked as deleted in the vector indexes that have not yet been cleaned. [3](#tnote-3) +* `search_marked_deleted_vectors`: The number of vectors marked as deleted in the vector indexes that have not yet been cleaned. Deprecated in 8.0 (renamed `search_gc_marked_delete_vectors`), but still available in older versions. [1](#tnote-1) +* `search_gc_total_cycles`: The total number of garbage collection cycles executed. [3](#tnote-3) +* `search_total_cycles`: The total number of garbage collection cycles executed. Deprecated in 8.0 (renamed `search_gc_total_cycles`), but still available in older versions. [1](#tnote-1) +* `search_gc_total_docs_not_collected_by_gc`: The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector. [3](#tnote-3) +* `search_total_docs_not_collected_by_gc`: The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector. Deprecated in 8.0 (renamed `search_gc_total_docs_not_collected`), but still available in older versions. [1](#tnote-1) +* `search_gc_total_ms_run`: The total duration of all garbage collection cycles in the shard, measured in milliseconds. [3](#tnote-3) +* `search_total_ms_run`: The total duration of all garbage collection cycles in the shard, measured in milliseconds. Deprecated in 8.0 (renamed `search_gc_total_ms_run`), but still available in older versions. [1](#tnote-1) + +* `search_cursors_internal_idle`: The total number of coordinator cursors that are currently holding pending results in the shard. [3](#tnote-3) +* `search_cursors_user_idle`: The total number of cursors that were explicitly requested by users, that are currently holding pending results in the shard. [3](#tnote-3) +* `search_global_idle`: The total number of user and internal cursors currently holding pending results in the shard. Deprecated in 8.0 (split into `search_cursors_internal_idle` and `search_cursors_user_idle`) but still available in older versions. [1](#tnote-1) +* `search_cursors_internal_active`: The total number of coordinator cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. [3](#tnote-3) +* `search_cursors_user_active`: The total number of user cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. [3](#tnote-3) +* `search_global_total`: The total number of user and internal cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. Deprecated in 8.0 (split into `search_cursors_internal_active` and `search_cursors_user_active`), but still available in older versions. [1](#tnote-1) * `search_number_of_indexes`: The total number of indexes in the shard. [1](#tnote-1) * `search_number_of_active_indexes`: The total number of indexes running a background indexing and/or background query processing operation. Background indexing refers to vector ingestion process, or in-progress background indexer. [1](#tnote-1) * `search_number_of_active_indexes_running_queries`: The total count of indexes currently running a background query process. [1](#tnote-1) @@ -530,8 +557,6 @@ The **modules** section contains additional information about loaded modules if * `search_largest_memory_index_human`: The memory usage of the index with the largest memory usage in the shard in MB. [1](#tnote-1) * `search_total_indexing_time`: The total time spent on indexing operations, excluding the background indexing of vectors in the HNSW graph. [1](#tnote-1) * `search_used_memory_vector_index`: The total memory usage of all vector indexes in the shard. [1](#tnote-1) -* `search_global_idle`: The total number of user and internal cursors currently holding pending results in the shard. [1](#tnote-1) -* `search_global_total`: The total number of user and internal cursors in the shard, either holding pending results or actively executing FT.CURSOR READ. [1](#tnote-1) * `search_bytes_collected`: The total amount of memory freed by the garbage collectors from indexes in the shard memory in bytes. [1](#tnote-1) * `search_total_cycles`: The total number of garbage collection cycles executed. [1](#tnote-1) * `search_total_ms_run`: The total duration of all garbage collection cycles in the shard, measured in milliseconds. [1](#tnote-1) @@ -546,6 +571,7 @@ The **modules** section contains additional information about loaded modules if 1. Available in RediSearch 2.6. 2. Available in RediSearch 2.8. +3. Available in RediSearch 8.0. The **keyspace** section provides statistics on the main dictionary of each database. The statistics are the number of keys, and the number of keys with an expiration. diff --git a/content/commands/json.arrappend/index.md b/content/commands/json.arrappend/index.md index 339e2a8fd6..35ddddc97d 100644 --- a/content/commands/json.arrappend/index.md +++ b/content/commands/json.arrappend/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.arrindex/index.md b/content/commands/json.arrindex/index.md index d987b3bedf..cba5ad9482 100644 --- a/content/commands/json.arrindex/index.md +++ b/content/commands/json.arrindex/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.arrinsert/index.md b/content/commands/json.arrinsert/index.md index df8b4cbaed..09e2f36d59 100644 --- a/content/commands/json.arrinsert/index.md +++ b/content/commands/json.arrinsert/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.arrlen/index.md b/content/commands/json.arrlen/index.md index e6f82f2a1a..7a10a19bda 100644 --- a/content/commands/json.arrlen/index.md +++ b/content/commands/json.arrlen/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.arrpop/index.md b/content/commands/json.arrpop/index.md index 32d0d0ba3a..62e5d507c8 100644 --- a/content/commands/json.arrpop/index.md +++ b/content/commands/json.arrpop/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.arrtrim/index.md b/content/commands/json.arrtrim/index.md index 8e8e567458..a60f4a2a8c 100644 --- a/content/commands/json.arrtrim/index.md +++ b/content/commands/json.arrtrim/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.clear/index.md b/content/commands/json.clear/index.md index 2f9a5fd0f3..a1f9eccd2a 100644 --- a/content/commands/json.clear/index.md +++ b/content/commands/json.clear/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.debug-memory/index.md b/content/commands/json.debug-memory/index.md index 86bb959d9b..2e1a7b88b9 100644 --- a/content/commands/json.debug-memory/index.md +++ b/content/commands/json.debug-memory/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@json' +- '@read' arguments: - name: key type: key diff --git a/content/commands/json.del/index.md b/content/commands/json.del/index.md index 414343ea89..a96c9bfa14 100644 --- a/content/commands/json.del/index.md +++ b/content/commands/json.del/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.forget/index.md b/content/commands/json.forget/index.md index e996dc3f9b..0e39b182dd 100644 --- a/content/commands/json.forget/index.md +++ b/content/commands/json.forget/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.get/index.md b/content/commands/json.get/index.md index f57153af97..5a2e2aaa13 100644 --- a/content/commands/json.get/index.md +++ b/content/commands/json.get/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.merge/index.md b/content/commands/json.merge/index.md index 34302b16b8..8a5227ebd7 100644 --- a/content/commands/json.merge/index.md +++ b/content/commands/json.merge/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.mget/index.md b/content/commands/json.mget/index.md index 29953100c0..73d31eb02f 100644 --- a/content/commands/json.mget/index.md +++ b/content/commands/json.mget/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - multiple: true name: key diff --git a/content/commands/json.mset/index.md b/content/commands/json.mset/index.md index 17c70d94e0..efa52fc891 100644 --- a/content/commands/json.mset/index.md +++ b/content/commands/json.mset/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - arguments: - name: key diff --git a/content/commands/json.numincrby/index.md b/content/commands/json.numincrby/index.md index 5d23ec1514..763e5a31e5 100644 --- a/content/commands/json.numincrby/index.md +++ b/content/commands/json.numincrby/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.nummultby/index.md b/content/commands/json.nummultby/index.md index 8663a9b874..d87b5b1d1c 100644 --- a/content/commands/json.nummultby/index.md +++ b/content/commands/json.nummultby/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.objkeys/index.md b/content/commands/json.objkeys/index.md index 4f6f245d3d..79ac3505ec 100644 --- a/content/commands/json.objkeys/index.md +++ b/content/commands/json.objkeys/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.objlen/index.md b/content/commands/json.objlen/index.md index aadc9de345..25d9928cc4 100644 --- a/content/commands/json.objlen/index.md +++ b/content/commands/json.objlen/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.resp/index.md b/content/commands/json.resp/index.md index 0ff1542921..fde8fb68cb 100644 --- a/content/commands/json.resp/index.md +++ b/content/commands/json.resp/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.set/index.md b/content/commands/json.set/index.md index d5b69af75f..21db196717 100644 --- a/content/commands/json.set/index.md +++ b/content/commands/json.set/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.strappend/index.md b/content/commands/json.strappend/index.md index 0ae54556a2..c482339774 100644 --- a/content/commands/json.strappend/index.md +++ b/content/commands/json.strappend/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.strlen/index.md b/content/commands/json.strlen/index.md index fee1f66055..79ed213b45 100644 --- a/content/commands/json.strlen/index.md +++ b/content/commands/json.strlen/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.toggle/index.md b/content/commands/json.toggle/index.md index da3333ed43..62f4bcdd36 100644 --- a/content/commands/json.toggle/index.md +++ b/content/commands/json.toggle/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/json.type/index.md b/content/commands/json.type/index.md index 62efb37dbe..6e8d6060af 100644 --- a/content/commands/json.type/index.md +++ b/content/commands/json.type/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@json' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/module-load/index.md b/content/commands/module-load/index.md index 734c291b46..0cb5e4e034 100644 --- a/content/commands/module-load/index.md +++ b/content/commands/module-load/index.md @@ -47,3 +47,7 @@ unmodified to the module. **Note**: modules can also be loaded at server startup with `loadmodule` configuration directive in `redis.conf`. + +{{< note >}} +As of Redis CE v8.0.0, loading a module using the Redis CLI with configuration parameters is deprecated. +{{< /note >}} \ No newline at end of file diff --git a/content/commands/tdigest.add/index.md b/content/commands/tdigest.add/index.md index d67142328e..3d029534fd 100644 --- a/content/commands/tdigest.add/index.md +++ b/content/commands/tdigest.add/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@tdigest' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/tdigest.byrank/index.md b/content/commands/tdigest.byrank/index.md index 47e606b642..b946b6cafe 100644 --- a/content/commands/tdigest.byrank/index.md +++ b/content/commands/tdigest.byrank/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.byrevrank/index.md b/content/commands/tdigest.byrevrank/index.md index 1a3dfe7a11..4f1f97bad0 100644 --- a/content/commands/tdigest.byrevrank/index.md +++ b/content/commands/tdigest.byrevrank/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.cdf/index.md b/content/commands/tdigest.cdf/index.md index cfd25a83e1..4c62521024 100644 --- a/content/commands/tdigest.cdf/index.md +++ b/content/commands/tdigest.cdf/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.create/index.md b/content/commands/tdigest.create/index.md index c178d22909..7d8b4221c8 100644 --- a/content/commands/tdigest.create/index.md +++ b/content/commands/tdigest.create/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@write' arguments: - name: key type: key diff --git a/content/commands/tdigest.info/index.md b/content/commands/tdigest.info/index.md index c80879f1ab..824d5db66c 100644 --- a/content/commands/tdigest.info/index.md +++ b/content/commands/tdigest.info/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.max/index.md b/content/commands/tdigest.max/index.md index 16fbaecb58..6aac2a7075 100644 --- a/content/commands/tdigest.max/index.md +++ b/content/commands/tdigest.max/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@tdigest' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/tdigest.merge/index.md b/content/commands/tdigest.merge/index.md index f4dd26e079..c03d9ae169 100644 --- a/content/commands/tdigest.merge/index.md +++ b/content/commands/tdigest.merge/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@tdigest' +- '@write' +- '@slow' arguments: - name: destination-key type: key diff --git a/content/commands/tdigest.min/index.md b/content/commands/tdigest.min/index.md index 416efbe181..b200275581 100644 --- a/content/commands/tdigest.min/index.md +++ b/content/commands/tdigest.min/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@tdigest' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/tdigest.quantile/index.md b/content/commands/tdigest.quantile/index.md index 87de095e79..d13ab2c350 100644 --- a/content/commands/tdigest.quantile/index.md +++ b/content/commands/tdigest.quantile/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.rank/index.md b/content/commands/tdigest.rank/index.md index db78c21794..460c548000 100644 --- a/content/commands/tdigest.rank/index.md +++ b/content/commands/tdigest.rank/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.reset/index.md b/content/commands/tdigest.reset/index.md index 78bc11e6db..80645b1f5c 100644 --- a/content/commands/tdigest.reset/index.md +++ b/content/commands/tdigest.reset/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@tdigest' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/tdigest.revrank/index.md b/content/commands/tdigest.revrank/index.md index 0a7f8ed612..f99602f5e4 100644 --- a/content/commands/tdigest.revrank/index.md +++ b/content/commands/tdigest.revrank/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/tdigest.trimmed_mean/index.md b/content/commands/tdigest.trimmed_mean/index.md index 1f8516a9a6..d56ec3a091 100644 --- a/content/commands/tdigest.trimmed_mean/index.md +++ b/content/commands/tdigest.trimmed_mean/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@tdigest' +- '@read' arguments: - name: key type: key diff --git a/content/commands/topk.add/index.md b/content/commands/topk.add/index.md index f35ebe2268..8cb47e40d4 100644 --- a/content/commands/topk.add/index.md +++ b/content/commands/topk.add/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/topk.count/index.md b/content/commands/topk.count/index.md index 33300c952d..64e8751386 100644 --- a/content/commands/topk.count/index.md +++ b/content/commands/topk.count/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/topk.incrby/index.md b/content/commands/topk.incrby/index.md index 21889447f3..618280595f 100644 --- a/content/commands/topk.incrby/index.md +++ b/content/commands/topk.incrby/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/topk.info/index.md b/content/commands/topk.info/index.md index fb700db931..32dd1ae517 100644 --- a/content/commands/topk.info/index.md +++ b/content/commands/topk.info/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/topk.list/index.md b/content/commands/topk.list/index.md index e8be56a8c6..3e2576f6c9 100644 --- a/content/commands/topk.list/index.md +++ b/content/commands/topk.list/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/topk.query/index.md b/content/commands/topk.query/index.md index 5a87b05aa1..8415b37fef 100644 --- a/content/commands/topk.query/index.md +++ b/content/commands/topk.query/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/topk.reserve/index.md b/content/commands/topk.reserve/index.md index a01b83080f..8bbb9e9db9 100644 --- a/content/commands/topk.reserve/index.md +++ b/content/commands/topk.reserve/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@topk' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/ts.add/index.md b/content/commands/ts.add/index.md index 3e66cc68a2..554e8d67e3 100644 --- a/content/commands/ts.add/index.md +++ b/content/commands/ts.add/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.alter/index.md b/content/commands/ts.alter/index.md index b3f0657c5d..53dcad7a31 100644 --- a/content/commands/ts.alter/index.md +++ b/content/commands/ts.alter/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.create/index.md b/content/commands/ts.create/index.md index 3f8f4e74c8..5db2ac00dc 100644 --- a/content/commands/ts.create/index.md +++ b/content/commands/ts.create/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/ts.createrule/index.md b/content/commands/ts.createrule/index.md index e7ab5fce2c..af768cb11e 100644 --- a/content/commands/ts.createrule/index.md +++ b/content/commands/ts.createrule/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@fast' arguments: - name: sourceKey type: key diff --git a/content/commands/ts.decrby/index.md b/content/commands/ts.decrby/index.md index 666d6e85d3..a9fb60aad7 100644 --- a/content/commands/ts.decrby/index.md +++ b/content/commands/ts.decrby/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.del/index.md b/content/commands/ts.del/index.md index 391fb68923..e74b21f9f7 100644 --- a/content/commands/ts.del/index.md +++ b/content/commands/ts.del/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.deleterule/index.md b/content/commands/ts.deleterule/index.md index a0ea74c23e..076ff4b955 100644 --- a/content/commands/ts.deleterule/index.md +++ b/content/commands/ts.deleterule/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@fast' arguments: - name: sourceKey type: key diff --git a/content/commands/ts.get/index.md b/content/commands/ts.get/index.md index 51bf33274b..33c0cbf03f 100644 --- a/content/commands/ts.get/index.md +++ b/content/commands/ts.get/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/ts.incrby/index.md b/content/commands/ts.incrby/index.md index 90cee0ecc3..5ae7a40cf5 100644 --- a/content/commands/ts.incrby/index.md +++ b/content/commands/ts.incrby/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.info/index.md b/content/commands/ts.info/index.md index 4e9c6b2557..34bc0cc8c1 100644 --- a/content/commands/ts.info/index.md +++ b/content/commands/ts.info/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@fast' arguments: - name: key type: key diff --git a/content/commands/ts.madd/index.md b/content/commands/ts.madd/index.md index dc02ca4015..aca37e1dc7 100644 --- a/content/commands/ts.madd/index.md +++ b/content/commands/ts.madd/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@write' +- '@slow' arguments: - arguments: - name: key diff --git a/content/commands/ts.mget/index.md b/content/commands/ts.mget/index.md index e53fdc57a5..29f9d130b4 100644 --- a/content/commands/ts.mget/index.md +++ b/content/commands/ts.mget/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - name: LATEST optional: true @@ -70,7 +74,12 @@ syntax_str: "[WITHLABELS | ] FILTER\_}} +This command will reply only if the current user has read access to all keys that match the filter. +Otherwise, it will reply with "*(error): current user doesn't have read permission to one or more keys that match the specified filter*". +{{< /note >}} [Examples](#examples) diff --git a/content/commands/ts.mrange/index.md b/content/commands/ts.mrange/index.md index 76b60b1d01..a8b8e02c97 100644 --- a/content/commands/ts.mrange/index.md +++ b/content/commands/ts.mrange/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - name: fromTimestamp type: string @@ -178,7 +182,12 @@ syntax_str: "toTimestamp [LATEST] [FILTER_BY_TS\_Timestamp [Timestamp ...]] [FIL title: TS.MRANGE --- -Query a range across multiple time series by filters in the forward direction +Query a range across multiple time series by filters in the forward direction. + +{{< note >}} +This command will reply only if the current user has read access to all keys that match the filter. +Otherwise, it will reply with "*(error): current user doesn't have read permission to one or more keys that match the specified filter*". +{{< /note >}} [Examples](#examples) diff --git a/content/commands/ts.mrevrange/index.md b/content/commands/ts.mrevrange/index.md index 4ffa6aa443..ef96908965 100644 --- a/content/commands/ts.mrevrange/index.md +++ b/content/commands/ts.mrevrange/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - name: fromTimestamp type: string @@ -178,7 +182,12 @@ syntax_str: "toTimestamp [LATEST] [FILTER_BY_TS\_Timestamp [Timestamp ...]] [FIL title: TS.MREVRANGE --- -Query a range across multiple time series by filters in the reverse direction +Query a range across multiple time series by filters in the reverse direction. + +{{< note >}} +This command will reply only if the current user has read access to all keys that match the filter. +Otherwise, it will reply with "*(error): current user doesn't have read permission to one or more keys that match the specified filter*". +{{< /note >}} [Examples](#examples) diff --git a/content/commands/ts.queryindex/index.md b/content/commands/ts.queryindex/index.md index 20187ff249..af806fd60f 100644 --- a/content/commands/ts.queryindex/index.md +++ b/content/commands/ts.queryindex/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - arguments: - name: l=v @@ -44,7 +48,7 @@ syntax_str: '' title: TS.QUERYINDEX --- -Get all time series keys matching a filter list +Get all time series keys matching a filter list. Note: all matching keys will be listed, whether or not the user has read access. [Examples](#examples) diff --git a/content/commands/ts.range/index.md b/content/commands/ts.range/index.md index 53847b74bc..f0cbf22bd5 100644 --- a/content/commands/ts.range/index.md +++ b/content/commands/ts.range/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/ts.revrange/index.md b/content/commands/ts.revrange/index.md index f5c3130ea2..d7a7fbed87 100644 --- a/content/commands/ts.revrange/index.md +++ b/content/commands/ts.revrange/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@timeseries' +- '@read' +- '@slow' arguments: - name: key type: key diff --git a/content/commands/vadd/index.md b/content/commands/vadd/index.md new file mode 100644 index 0000000000..2e5d65c2f7 --- /dev/null +++ b/content/commands/vadd/index.md @@ -0,0 +1,119 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(log(N)) for each element added, where N is the number of elements in the vector set. +description: Add a new element to a vector set, or update its vector if it already exists. +group: vector_set +hidden: false +linkTitle: VADD +since: 8.0.0 +summary: Add a new element to a vector set, or update its vector if it already exists. +syntax_fmt: "VADD key [REDUCE dim] (FP32 | VALUES num) vector element [CAS] [NOQUANT | Q8 | BIN]\n [EF build-exploration-factor] [SETATTR attributes] [M numlinks]" +title: VADD +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Add a new element into the vector set specified by `key`. The vector can be provided as 32-bit floating point (`FP32`) blob of values, or as floating point numbers as strings, prefixed by the number of elements (3 in the example below): + +``` +VADD mykey VALUES 3 0.1 1.2 0.5 my-element +``` + +## Required arguments + +
+key + +is the name of the key that will hold the vector set data. +
+ +
+FP32 vector or VALUES num vector + +either a 32-bit floating point (FP32) blob of values or `num` floating point numbers as strings. +
+ +
+element + +is the name of the element that is being added to the vector set. +
+ +## Optional arguments + +
+REDUCE dim + +implements random projection to reduce the dimensionality of the vector. The projection matrix is saved and reloaded along with the vector set. Please note that the REDUCE option must be passed immediately before the vector. For example, + +``` +VADD mykey REDUCE 50 VALUES ... +``` +
+ +
+CAS + +performs the operation partially using threads, in a check-and-set style. The neighbor candidates collection, which is slow, is performed in the background, while the command is executed in the main thread. +
+ +
+NOQUANT + +in the first VADD call for a given key, NOQUANT forces the vector to be created without int8 quantization, which is otherwise the default. +
+ +
+BIN + +forces the vector to use binary quantization instead of int8. This is much faster and uses less memory, but impacts the recall quality. +
+ +
+Q8 + +forces the vector to use signed 8-bit quantization. This is the default, and the option only exists to make sure to check at insertion time that the vector set is of the same format. +
+ +{{< note >}} +`NOQUANT`, `Q8`, and `BIN` are mutually exclusive. + +{{< /note >}} + +
+EF build-exploration-factor + +plays a role in the effort made to find good candidates when connecting the new node to the existing Hierarchical Navigable Small World (HNSW) graph. The default is 200. Using a larger value may help in achieving a better recall. To improve the recall it is also possible to increase EF during VSIM searches. +
+ +
+SETATTR attributes + +associates attributes in the form of a JavaScript object to the newly created entry or updates the attributes (if they already exist). +It is the same as calling the VSETATTR command separately. +
+ +
+M numlinks + +is the maximum number of connections that each node of the graph will have with other nodes. The default is 16. More connections means more memory, but provides for more efficient graph exploration. Nodes at layer zero (every node exists at least at layer zero) have `M * 2` connections, while the other layers only have `M` connections. For example, setting `M` to `64` will use at least 1024 bytes of memory for layer zero. That's `M * 2` connections times 8 bytes (pointers), or `128 * 8 = 1024`. For higher layers, consider the following: + +- Each node appears in ~1.33 layers on average (empirical observation from HNSW papers), which works out to be 0.33 higher layers per node. +- Each of those higher layers has `M = 64` connections. + +So, the additional amount of memory is approximately `0.33 × 64 × 8 ≈ 169.6` bytes per node, bringing the total memory to ~1193 bytes. + +If you don't have a recall quality problem, the default is acceptable, and uses a minimal amount of memory. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) \ No newline at end of file diff --git a/content/commands/vcard/index.md b/content/commands/vcard/index.md new file mode 100644 index 0000000000..2aa7868318 --- /dev/null +++ b/content/commands/vcard/index.md @@ -0,0 +1,41 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Return the number of elements in a vector set. +group: vector_set +hidden: false +linkTitle: VCARD +since: 8.0.0 +summary: Return the number of elements in a vector set. +syntax_fmt: "VCARD key" +title: VCARD +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return the number of elements in the specified vector set. + +```shell +VCARD word_embeddings +(integer) 3000000 +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vdim/index.md b/content/commands/vdim/index.md new file mode 100644 index 0000000000..d033a5ddcb --- /dev/null +++ b/content/commands/vdim/index.md @@ -0,0 +1,43 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Return the dimension of vectors in the vector set. +group: vector_set +hidden: false +linkTitle: VDIM +since: 8.0.0 +summary: Return the dimension of vectors in the vector set. +syntax_fmt: "VDIM key" +title: VDIM +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return the number of dimensions of the vectors in the specified vector set. + +```shell +VDIM word_embeddings +(integer) 300 +``` + +If the vector set was created using the `REDUCE` option for dimensionality reduction, this command reports the reduced dimension. However, you must still use full-size vectors when performing queries with the `VSIM` command. + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vemb/index.md b/content/commands/vemb/index.md new file mode 100644 index 0000000000..861ae8769b --- /dev/null +++ b/content/commands/vemb/index.md @@ -0,0 +1,72 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Return the vector associated with an element. +group: vector_set +hidden: false +linkTitle: VEMB +since: 8.0.0 +summary: Return the vector associated with an element. +syntax_fmt: "VEMB key element [RAW]" +title: VEMB +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return the approximate vector associated with a given element in the vector set. + +```shell +VEMB word_embeddings SQL +1) "0.18208661675453186" +2) "0.08535309880971909" +3) "0.1365649551153183" +4) "-0.16501599550247192" +5) "0.14225517213344574" +... 295 more elements ... +``` + +Vector sets normalize and may quantize vectors on insertion. `VEMB` reverses this process to approximate the original vector by de-normalizing and de-quantizing it. + +To retrieve the raw internal representation, use the `RAW` option: + +```shell +VEMB word_embeddings apple RAW +1) int8 +2) "\xf1\xdc\xfd\x1e\xcc%E...\xde\x1f\xfbN" # artificially shortened for this example +3) "3.1426539421081543" +4) "0.17898885905742645" +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element whose vector you want to retrieve. +
+ +## Optional arguments + +
+RAW + +returns the raw vector data, its quantization type, and metadata such as norm and range. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vgetattr/index.md b/content/commands/vgetattr/index.md new file mode 100644 index 0000000000..68184c7fc7 --- /dev/null +++ b/content/commands/vgetattr/index.md @@ -0,0 +1,46 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Retrieve the JSON attributes of elements. +group: vector_set +hidden: false +linkTitle: VGETATTR +since: 8.0.0 +summary: Retrieve the JSON attributes of elements. +syntax_fmt: "VGETATTR key element" +title: VGETATTR +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return the JSON attributes associated with an element in a vector set. + +```shell +VGETATTR key element +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element whose attributes you want to retrieve. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vinfo/index.md b/content/commands/vinfo/index.md new file mode 100644 index 0000000000..7044fdf7ad --- /dev/null +++ b/content/commands/vinfo/index.md @@ -0,0 +1,52 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Return information about a vector set. +group: vector_set +hidden: false +linkTitle: VINFO +since: 8.0.0 +summary: Return information about a vector set. +syntax_fmt: "VINFO key" +title: VINFO +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure. + +```shell +VINFO word_embeddings +1) quant-type +2) int8 +3) vector-dim +4) (integer) 300 +5) size +6) (integer) 3000000 +7) max-level +8) (integer) 12 +9) vset-uid +10) (integer) 1 +11) hnsw-max-node-uid +12) (integer) 3000000 +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vlinks/index.md b/content/commands/vlinks/index.md new file mode 100644 index 0000000000..5c88a1e927 --- /dev/null +++ b/content/commands/vlinks/index.md @@ -0,0 +1,60 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Return the neighbors of an element at each layer in the HNSW graph. +group: vector_set +hidden: false +linkTitle: VLINKS +since: 8.0.0 +summary: Return the neighbors of an element at each layer in the HNSW graph. +syntax_fmt: "VLINKS key element [WITHSCORES]" +title: VLINKS +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return the neighbors of a specified element in a vector set. The command shows the connections for each layer of the HNSW graph. + +```shell +VLINKS key element +``` + +Use the `WITHSCORES` option to include similarity scores for each neighbor. + +```shell +VLINKS key element WITHSCORES +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element whose HNSW neighbors you want to inspect. +
+ +## Optional arguments + +
+WITHSCORES + +includes similarity scores for each neighbor. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vrandmember/index.md b/content/commands/vrandmember/index.md new file mode 100644 index 0000000000..bf8ea842b1 --- /dev/null +++ b/content/commands/vrandmember/index.md @@ -0,0 +1,113 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(N) where N is the absolute value of the count argument. +description: Return one or multiple random members from a vector set. +group: vector_set +hidden: false +linkTitle: VRANDMEMBER +since: 8.0.0 +summary: Return one or multiple random members from a vector set. +syntax_fmt: "VRANDMEMBER key [count]" +title: VRANDMEMBER +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return one or more random elements from a vector set. + +The behavior is similar to the `SRANDMEMBER` command: + +- When called without a count, returns a single element as a bulk string. +- When called with a positive count, returns up to that many distinct elements (no duplicates). +- When called with a negative count, returns that many elements, possibly with duplicates. +- If the count exceeds the number of elements, the entire set is returned. +- If the key does not exist, the command returns `null` if no count is given, or an empty array if a count is provided. + +```shell +VADD vset VALUES 3 1 0 0 elem1 +VADD vset VALUES 3 0 1 0 elem2 +VADD vset VALUES 3 0 0 1 elem3 +``` + +Return a single random element: + +```shell +VRANDMEMBER vset +"elem2" +``` + +Return two distinct random elements: + +```shell +VRANDMEMBER vset 2 +1) "elem1" +2) "elem3" +``` + +Return 3 random elements with possible duplicates: + +```shell +VRANDMEMBER vset -3 +1) "elem2" +2) "elem2" +3) "elem1" +``` + +Request more elements than exist in the set: + +```shell +VRANDMEMBER vset 10 +1) "elem1" +2) "elem2" +3) "elem3" +``` + +When the key doesn't exist: + +```shell +VRANDMEMBER nonexistent +(nil) +``` + +```shell +VRANDMEMBER nonexistent 3 +(empty array) +``` + +This command is useful for: + +- Sampling elements for testing or training. +- Generating random queries for performance testing. + +Internally: + +- For small counts (less than 20% of the set size), a dictionary is used to ensure uniqueness. +- For large counts (more than 20% of the set size), a linear scan provides faster performance, though results may be less random. + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +## Optional arguments + +
+count + +specifies the number of elements to return. Positive values return distinct elements; negative values allow duplicates. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vrem/index.md b/content/commands/vrem/index.md new file mode 100644 index 0000000000..208caae252 --- /dev/null +++ b/content/commands/vrem/index.md @@ -0,0 +1,59 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- 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. +group: vector_set +hidden: false +linkTitle: VREM +since: 8.0.0 +summary: Remove one or more elements 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. +--- + +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 +``` + +`VREM` reclaims memory immediately. It does not use tombstones or logical deletions, making it safe to use in long-running applications that frequently update the same vector set. + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element to remove from the vector set. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vsetattr/index.md b/content/commands/vsetattr/index.md new file mode 100644 index 0000000000..ca4833b90b --- /dev/null +++ b/content/commands/vsetattr/index.md @@ -0,0 +1,60 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(1) +description: Associate or remove the JSON attributes of elements. +group: vector_set +hidden: false +linkTitle: VSETATTR +since: 8.0.0 +summary: Associate or remove the JSON attributes of elements. +syntax_fmt: "VSETATTR key element \"{ JSON obj }\"" +title: VSETATTR +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Associate a JSON object with an element in a vector set. Use this command to store attributes that can be used in filtered similarity searches with `VSIM`. + +You can also update existing attributes or delete them by setting an empty string. + +```shell +VSETATTR key element "{\"type\": \"fruit\", \"color\": \"red\"}" +``` + +To remove attributes, pass an empty JSON string: + +```shell +VSETATTR key element "" +``` + +## Required arguments + +
+key + +is the name of the key that holds the vector set. +
+ +
+element + +is the name of the element whose attributes you want to set or remove. +
+ +
+json + +is a valid JSON string. Use an empty string (`""`) to delete the attributes. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/commands/vsim/index.md b/content/commands/vsim/index.md new file mode 100644 index 0000000000..a6bbfa991d --- /dev/null +++ b/content/commands/vsim/index.md @@ -0,0 +1,122 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +complexity: O(log(N)) where N is the number of elements in the vector set. +description: Return elements by vector similarity. +group: vector_set +hidden: false +linkTitle: VSIM +since: 8.0.0 +summary: Return elements by vector similarity. +syntax_fmt: "VSIM key (ELE | FP32 | VALUES num) (vector | element) [WITHSCORES] [COUNT num] [EF search-exploration-factor]\n [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] [NOTHREAD]" +title: VSIM +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +--- + +Return elements similar to a given vector or element. Use this command to perform approximate or exact similarity searches within a vector set. + +You can query using either a vector (via `FP32` or `VALUES num`) or by referencing another element (using `ELE`). Optional parameters let you control the search behavior, such as score output, result count, and filtering options. + +```shell +VSIM word_embeddings ELE apple +1) "apple" +2) "apples" +3) "pear" +4) "fruit" +5) "berry" +6) "pears" +7) "strawberry" +8) "peach" +9) "potato" +10) "grape" +``` + +You can include similarity scores and limit the number of results: + +```shell +VSIM word_embeddings ELE apple WITHSCORES COUNT 3 +1) "apple" +2) "0.9998867657923256" +3) "apples" +4) "0.8598527610301971" +5) "pear" +6) "0.8226882219314575" +``` + +Set the `EF` (exploration factor) to improve recall at the cost of performance. Use the `TRUTH` option to perform an exact linear scan, useful for benchmarking. The `NOTHREAD` option runs the search in the main thread and may increase server latency. + +## Required arguments + +
+key + +is the name of the key that holds the vector set data. +
+ +
+ELE | FP32 | VALUES num + +specifies how the input vector is provided. Use `ELE` to refer to an existing element, `FP32` for binary float format, or `VALUES num` for a list of stringified float values. +
+ +
+vector or element + +is either the vector data (for `FP32` or `VALUES`) or the name of the element (for `ELE`) to use as the similarity reference. +
+ +## Optional arguments + +
+WITHSCORES + +returns the similarity score (from 1 to 0) alongside each result. A score of 1 is identical; 0 is the opposite. +
+ +
+COUNT num + +limits the number of returned results to `num`. +
+ +
+EF search-exploration-factor + +controls the search effort. Higher values explore more nodes, improving recall at the cost of speed. Typical values range from 50 to 1000. +
+ +
+FILTER expression + +applies a filter expression to restrict matching elements. See the filtered search section for syntax details. +
+ +
+FILTER-EF max-filtering-effort + +limits the number of filtering attempts for the `FILTER` expression. See the filtered search section for more. +
+ +
+TRUTH + +forces an exact linear scan of all elements, bypassing the HNSW graph. Use for benchmarking or to calculate recall. This is significantly slower (O(N)). +
+ +
+NOTHREAD + +executes the search in the main thread instead of a background thread. Useful for small vector sets or benchmarks. This may block the server during execution. +
+ +## Related topics + +- [Vector sets]({{< relref "/develop/data-types/vector-sets" >}}) diff --git a/content/develop/clients/_index.md b/content/develop/clients/_index.md index da11724978..2e342239d6 100644 --- a/content/develop/clients/_index.md +++ b/content/develop/clients/_index.md @@ -57,8 +57,8 @@ Redis does not document directly: ## Requirements You will need access to a Redis server to use these libraries. -You can experiment with a local installation of Redis Stack -(see [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}})) or with a free trial of [Redis Cloud]({{< relref "/operate/rc" >}}). +You can experiment with a local installation of Redis Community Edition +(see [Install Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}})) or with a free trial of [Redis Cloud]({{< relref "/operate/rc" >}}). To interact with a Redis server without writing code, use the [Redis CLI]({{< relref "/develop/tools/cli" >}}) and [Redis Insight]({{< relref "/develop/tools/insight" >}}) tools. diff --git a/content/develop/clients/dotnet/_index.md b/content/develop/clients/dotnet/_index.md index e1dd60f62a..5e12c52d06 100644 --- a/content/develop/clients/dotnet/_index.md +++ b/content/develop/clients/dotnet/_index.md @@ -20,7 +20,7 @@ weight: 3 The sections below explain how to install `NRedisStack` and connect your application to a Redis database. -`NRedisStack` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +`NRedisStack` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. You can also access Redis with an object-mapping client interface. See [Redis OM for .NET]({{< relref "/integrate/redisom-for-net" >}}) @@ -70,9 +70,9 @@ Console.WriteLine(String.Join("; ", hashFields)); // Prints: // name: John; surname: Smith; company: Redis; age: 29 ``` -## Redis Stack modules +## Redis Community Edition modules -To access Redis Stack capabilities, use the appropriate interface like this: +To access Redis Community Edition capabilities, use the appropriate interface like this: ``` IBloomCommands bf = db.BF(); diff --git a/content/develop/clients/dotnet/queryjson.md b/content/develop/clients/dotnet/queryjson.md index 422853a9d2..9a14e4f77c 100644 --- a/content/develop/clients/dotnet/queryjson.md +++ b/content/develop/clients/dotnet/queryjson.md @@ -20,7 +20,7 @@ This example shows how to create a for [JSON]({{< relref "/develop/data-types/json" >}}) data and run queries against the index. -Make sure that you have Redis Stack and `NRedisStack` installed. +Make sure that you have Redis Community Edition and `NRedisStack` installed. Start by importing dependencies: diff --git a/content/develop/clients/go/_index.md b/content/develop/clients/go/_index.md index b415ffb12e..4423f06e81 100644 --- a/content/develop/clients/go/_index.md +++ b/content/develop/clients/go/_index.md @@ -19,8 +19,7 @@ weight: 7 [`go-redis`](https://github.com/redis/go-redis) is the [Go](https://go.dev/) client for Redis. The sections below explain how to install `go-redis` and connect your application to a Redis database. -`go-redis` requires a running Redis or -[Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. +`go-redis` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. diff --git a/content/develop/clients/go/queryjson.md b/content/develop/clients/go/queryjson.md index 3e874b83cc..259c8c5dd1 100644 --- a/content/develop/clients/go/queryjson.md +++ b/content/develop/clients/go/queryjson.md @@ -19,7 +19,7 @@ This example shows how to create a for [JSON]({{< relref "/develop/data-types/json" >}}) data and run queries against the index. -Make sure that you have Redis Stack and `go-redis` installed. +Make sure that you have Redis Community Edition and `go-redis` installed. Start by importing dependencies: diff --git a/content/develop/clients/jedis/_index.md b/content/develop/clients/jedis/_index.md index 1ae36dca9d..32ff86748b 100644 --- a/content/develop/clients/jedis/_index.md +++ b/content/develop/clients/jedis/_index.md @@ -22,7 +22,7 @@ a more advanced Java client that also supports asynchronous and reactive connect The sections below explain how to install `Jedis` and connect your application to a Redis database. -`Jedis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +`Jedis` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. ## Install diff --git a/content/develop/clients/jedis/queryjson.md b/content/develop/clients/jedis/queryjson.md index 04e7319580..d594b191e3 100644 --- a/content/develop/clients/jedis/queryjson.md +++ b/content/develop/clients/jedis/queryjson.md @@ -20,7 +20,7 @@ This example shows how to create a for [JSON]({{< relref "/develop/data-types/json" >}}) data and run queries against the index. -Make sure that you have Redis Stack and `Jedis` installed. +Make sure that you have Redis Community Edition and `Jedis` installed. Start by importing dependencies: diff --git a/content/develop/clients/lettuce/_index.md b/content/develop/clients/lettuce/_index.md index 8c8c9b9c6f..74fb817e98 100644 --- a/content/develop/clients/lettuce/_index.md +++ b/content/develop/clients/lettuce/_index.md @@ -24,7 +24,7 @@ If you only need synchronous connections then you may find the other Java client The sections below explain how to install `Lettuce` and connect your application to a Redis database. -`Lettuce` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +`Lettuce` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. ## Install diff --git a/content/develop/clients/nodejs/_index.md b/content/develop/clients/nodejs/_index.md index 8bc77c2ecc..1946ab6fe6 100644 --- a/content/develop/clients/nodejs/_index.md +++ b/content/develop/clients/nodejs/_index.md @@ -20,7 +20,7 @@ weight: 4 The sections below explain how to install `node-redis` and connect your application to a Redis database. -`node-redis` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +`node-redis` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. You can also access Redis with an object-mapping client interface. See [RedisOM for Node.js]({{< relref "/integrate/redisom-for-node-js" >}}) diff --git a/content/develop/clients/om-clients/_index.md b/content/develop/clients/om-clients/_index.md index d1902af7a9..773adfe6cf 100644 --- a/content/develop/clients/om-clients/_index.md +++ b/content/develop/clients/om-clients/_index.md @@ -10,14 +10,14 @@ categories: - oss - kubernetes - clients -description: Object-Mapper libraries for Redis Stack +description: Object-Mapper libraries for Redis Community Edition linkTitle: Object mapping stack: true title: Object-Mapper libraries weight: 10 --- -Redis OM (pronounced *REDiss OHM*) is a library that provides object mapping for Redis. With the help of Redis OM, you can map Redis data types, specifically Hashes and JSON documents, to objects of your preferred programming language or framework. Redis OM relies on Redis Stack's JSON, query, and search features, allowing you to query and search for objects. +Redis OM (pronounced *REDiss OHM*) is a library that provides object mapping for Redis. With the help of Redis OM, you can map Redis data types, specifically Hashes and JSON documents, to objects of your preferred programming language or framework. Redis OM relies on the JSON and Redis Query Engine features of Redis Community Edition, allowing you to search and/or query for objects. You can use Redis OM with the following four programming languages: diff --git a/content/develop/clients/php/_index.md b/content/develop/clients/php/_index.md index 713a670e66..b67702efa2 100644 --- a/content/develop/clients/php/_index.md +++ b/content/develop/clients/php/_index.md @@ -24,8 +24,7 @@ The sections below explain how to install `Predis` and connect your application client library and is not developed or supported directly by Redis. {{< /note >}} -`Predis` requires a running Redis or -[Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. +`Predis` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. diff --git a/content/develop/clients/php/queryjson.md b/content/develop/clients/php/queryjson.md index 13c2a4b21b..2236274d12 100644 --- a/content/develop/clients/php/queryjson.md +++ b/content/develop/clients/php/queryjson.md @@ -17,7 +17,7 @@ weight: 2 This example shows how to index and query Redis JSON data using `predis`. -Make sure that you have Redis Stack and `predis` installed, as described +Make sure that you have Redis Community Edition and `predis` installed, as described in the [Install](#install) section above. Start by importing dependencies: diff --git a/content/develop/clients/redis-py/_index.md b/content/develop/clients/redis-py/_index.md index 7b9b513a71..406276deca 100644 --- a/content/develop/clients/redis-py/_index.md +++ b/content/develop/clients/redis-py/_index.md @@ -20,7 +20,7 @@ weight: 1 The sections below explain how to install `redis-py` and connect your application to a Redis database. -`redis-py` requires a running Redis or [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. +`redis-py` requires a running [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation instructions. You can also access Redis with an object-mapping client interface. See [RedisOM for Python]({{< relref "/integrate/redisom-for-python" >}}) diff --git a/content/develop/clients/redis-py/queryjson.md b/content/develop/clients/redis-py/queryjson.md index 4cb28eb354..76ed37e7ae 100644 --- a/content/develop/clients/redis-py/queryjson.md +++ b/content/develop/clients/redis-py/queryjson.md @@ -20,7 +20,7 @@ This example shows how to create a for [JSON]({{< relref "/develop/data-types/json" >}}) data and run queries against the index. -Make sure that you have Redis Stack and `redis-py` installed. +Make sure that you have Redis Community Edition and `redis-py` installed. Import dependencies: diff --git a/content/develop/data-types/_index.md b/content/develop/data-types/_index.md index 58f279fe55..01da0c3c9a 100644 --- a/content/develop/data-types/_index.md +++ b/content/develop/data-types/_index.md @@ -38,7 +38,7 @@ implements the following data types: - [Bitfield](#bitfields) - [Geospatial](#geospatial-indexes) -[Redis Stack]({{< relref "/operate/oss_and_stack" >}}) and +[Redis Community Edition]({{< relref "/operate/oss_and_stack" >}}) and [Redis Enterprise]({{< relref "/operate/rs" >}}) also include some [extension modules](#adding-extensions) that implement other useful types, such as JSON. See [Extension data types](#extension-data-types) @@ -122,7 +122,7 @@ For more information, see: ## Extension data types -[Redis Stack]({{< relref "/operate/oss_and_stack" >}}) and +[Redis Community Edition]({{< relref "/operate/oss_and_stack" >}}) and [Redis Enterprise]({{< relref "/operate/rs" >}}) include some [extension modules](#adding-extensions) that implement the following data types: @@ -229,4 +229,4 @@ To extend the features provided by the included data types, use one of these opt 1. Write your own custom [server-side functions in Lua]({{< relref "/develop/interact/programmability/" >}}). 1. Write your own Redis module using the [modules API]({{< relref "/develop/reference/modules/" >}}) or check out the [community-supported modules]({{< relref "/operate/oss_and_stack/stack-with-enterprise/" >}}). -1. Use [JSON]({{< relref "/develop/data-types/json/" >}}), [search]({{< relref "/develop/interact/search-and-query/" >}}), [time series]({{< relref "/develop/data-types/timeseries/" >}}), and other capabilities provided by [Redis Stack]({{< relref "/operate/oss_and_stack/" >}}). +1. Use [JSON]({{< relref "/develop/data-types/json/" >}}), [search]({{< relref "/develop/interact/search-and-query/" >}}), [time series]({{< relref "/develop/data-types/timeseries/" >}}), and other capabilities provided by [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}). diff --git a/content/develop/data-types/json/_index.md b/content/develop/data-types/json/_index.md index c575a5279b..8c52c6ef0e 100644 --- a/content/develop/data-types/json/_index.md +++ b/content/develop/data-types/json/_index.md @@ -19,7 +19,7 @@ weight: 11 [![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/QUkjSsk) [![Github](https://img.shields.io/static/v1?label=&message=repository&color=5961FF&logo=github)](https://github.com/RedisJSON/RedisJSON/) -The JSON capability of Redis Stack provides JavaScript Object Notation (JSON) support for Redis. It lets you store, update, and retrieve JSON values in a Redis database, similar to any other Redis data type. Redis JSON also works seamlessly with the [Redis Query Engine]({{< relref "/develop/interact/search-and-query/" >}}) to let you [index and query JSON documents]({{< relref "/develop/interact/search-and-query/indexing/" >}}). +The JSON capability of Redis Community Edition provides JavaScript Object Notation (JSON) support for Redis. It lets you store, update, and retrieve JSON values in a Redis database, similar to any other Redis data type. Redis JSON also works seamlessly with the [Redis Query Engine]({{< relref "/develop/interact/search-and-query/" >}}) to let you [index and query JSON documents]({{< relref "/develop/interact/search-and-query/indexing/" >}}). ## Primary features @@ -144,11 +144,9 @@ $ redis-cli --raw ## Enable Redis JSON -Redis JSON is not available by default in the basic Redis server, so you -should install Redis Stack or Redis Enterprise, -both of which include JSON and other useful modules. +The Redis JSON data type is part of Redis Community Edition and it is also available in Redis Software and Redis Cloud. See -[Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or +[Install Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or [Install Redis Enterprise]({{< relref "/operate/rs/installing-upgrading/install" >}}) for full installation instructions. diff --git a/content/develop/data-types/json/indexing_JSON.md b/content/develop/data-types/json/indexing_JSON.md index 27e2b003db..e5f6abbc2c 100644 --- a/content/develop/data-types/json/indexing_JSON.md +++ b/content/develop/data-types/json/indexing_JSON.md @@ -17,6 +17,6 @@ weight: 2 In addition to storing JSON documents, you can also index them using the [Redis Query Engine]({{< relref "/develop/interact/search-and-query/" >}}) feature. This enables full-text search capabilities and document retrieval based on their content. -To use these features, you must install two modules: RedisJSON and RediSearch. [Redis Stack]({{< relref "/operate/oss_and_stack/" >}}) automatically includes both modules. +To use these features, install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}). See the [tutorial]({{< relref "/develop/interact/search-and-query/indexing/" >}}) to learn how to search and query your JSON. \ No newline at end of file diff --git a/content/develop/data-types/json/performance/_index.md b/content/develop/data-types/json/performance/_index.md index d2a13a9092..911ed95a67 100644 --- a/content/develop/data-types/json/performance/_index.md +++ b/content/develop/data-types/json/performance/_index.md @@ -107,7 +107,7 @@ performance of the module: ## Comparison vs. server-side Lua scripting -We compare Redis Stack's JSON performance with Redis' embedded Lua engine. For this purpose, we use the Lua +We compare Redis Community Edition's JSON performance with the Redis embedded Lua engine. For this purpose, we use the Lua scripts at [/benchmarks/lua](https://github.com/RedisLabsModules/redisjson/tree/master/benchmarks/lua). These scripts provide JSON's GET and SET functionality on values stored in JSON or MessagePack formats. Each of the different operations (set root, get root, set path and get path) is executed diff --git a/content/develop/data-types/json/use_cases.md b/content/develop/data-types/json/use_cases.md index 2b2e1f73bc..537b8ee406 100644 --- a/content/develop/data-types/json/use_cases.md +++ b/content/develop/data-types/json/use_cases.md @@ -31,4 +31,4 @@ JSON allows you to atomically run operations like incrementing a value, adding, **Indexing and querying** -When you store JSON objects as Redis strings, there's no good way to query those objects. On the other hand, storing these objects as JSON using Redis Stack lets you index and query them. This capability is provided by the Redis Query Engine. \ No newline at end of file +When you store JSON objects as Redis strings, there's no good way to query those objects. On the other hand, storing these objects as JSON using Redis Community Edition lets you index and query them. This capability is provided by the Redis Query Engine. \ No newline at end of file diff --git a/content/develop/data-types/probabilistic/Configuration.md b/content/develop/data-types/probabilistic/Configuration.md deleted file mode 100644 index 0cc9071f90..0000000000 --- a/content/develop/data-types/probabilistic/Configuration.md +++ /dev/null @@ -1,101 +0,0 @@ ---- -categories: -- docs -- develop -- stack -- oss -- rs -- rc -- oss -- kubernetes -- clients -description: 'RedisBloom supports multiple module configuration parameters. All of - these parameters can only be set at load-time. - - ' -linkTitle: Configuration -title: Configuration Parameters -weight: 100 ---- - -## Setting configuration parameters on module load - -Setting configuration parameters at load-time is done by appending arguments after the `--loadmodule` argument when starting a server from the command line or after the `loadmodule` directive in a Redis config file. For example: - -In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): - -```sh -loadmodule ./redisbloom.so [OPT VAL]... -``` - -From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: - -``` -127.0.0.6379> MODULE LOAD redisbloom.so [OPT VAL]... -``` - -From the command line: - -```sh -$ redis-server --loadmodule ./redisbloom.so [OPT VAL]... -``` - -## RedisBloom configuration parameters - -The following table summarizes which configuration parameters can be set at module load-time and which can be set on run-time: - -| Configuration Parameter | Load-time | Run-time | -| :------- | :----- | :----------- | -| [ERROR_RATE](#error_rate) | :white_check_mark: | :white_large_square: | -| [INITIAL_SIZE](#initial_size) | :white_check_mark: | :white_large_square: | -| [CF_MAX_EXPANSIONS](#cf_max_expansions) | :white_check_mark: | :white_large_square: | - - -## Default parameters - -!!! warning "Note on using initialization default sizes" - A filter should always be sized for the expected capacity and the desired error-rate. - Using the `INSERT` family commands with the default values should be used in cases where many small filter exist and the expectation is most will remain at about that size. - Not optimizing a filter for its intended use will result in degradation of performance and memory efficiency. - -### ERROR_RATE - -Default error ratio for Bloom filters. - -#### Default - -`0.01` - -#### Example - -``` -$ redis-server --loadmodule /path/to/redisbloom.so ERROR_RATE 0.004 -``` - -### INITIAL_SIZE - -Default initial capacity for Bloom filters. - -#### Default - -`100` - -#### Example - -``` -$ redis-server --loadmodule /path/to/redisbloom.so INITIAL_SIZE 400 -``` - -### CF_MAX_EXPANSIONS - -Default maximum expansions for Cuckoo filters. - -#### Default - -`32` - -#### Example - -``` -$ redis-server --loadmodule /path/to/redisbloom.so CF_MAX_EXPANSIONS 16 -``` diff --git a/content/develop/data-types/probabilistic/_index.md b/content/develop/data-types/probabilistic/_index.md index d3da185ad1..680812ced9 100644 --- a/content/develop/data-types/probabilistic/_index.md +++ b/content/develop/data-types/probabilistic/_index.md @@ -22,10 +22,8 @@ many common purposes but are much more efficient to calculate. They sometimes have other advantages too, such as obfuscating times, locations, and other sensitive data. -Probabilistic data structures are not available by default in the basic -Redis server, so you should install Redis Stack or Redis Enterprise, -both of which include probabilistic structures and other useful modules. +Probabilistic data structures are available as part of Redis Community Edition and they are available in Redis Software and Redis Cloud. See -[Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or +[Install Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or [Install Redis Enterprise]({{< relref "/operate/rs/installing-upgrading/install" >}}) for full installation instructions. \ No newline at end of file diff --git a/content/develop/data-types/probabilistic/bloom-filter.md b/content/develop/data-types/probabilistic/bloom-filter.md index 08a864ac22..fde6dad012 100644 --- a/content/develop/data-types/probabilistic/bloom-filter.md +++ b/content/develop/data-types/probabilistic/bloom-filter.md @@ -17,7 +17,7 @@ title: Bloom filter weight: 10 --- -A Bloom filter is a probabilistic data structure in Redis Stack that enables you to check if an item is present in a set using a very small memory space of a fixed size. +A Bloom filter is a probabilistic data structure in Redis Community Edition that enables you to check if an element is present in a set using a very small memory space of a fixed size. Instead of storing all the items in a set, a Bloom Filter stores only the items' hashed representations, thus sacrificing some precision. The trade-off is that Bloom Filters are very space-efficient and fast. @@ -31,7 +31,7 @@ This application answers the question, "Has the user paid from this location bef Use one Bloom filter per user, checked for every transaction. Provide an extremely fast response (local latency). Replicate in different regions in case the user moves. Prevent decreasing performance with scale. -Using Redis Stack's Bloom filter for this type of application provides these benefits: +Using the Redis Bloom filter for this type of application provides these benefits: - Fast transaction completion - Decreased possibility for transaction to break in case of network partitions (connection needs to be kept open for a shorter time) @@ -55,7 +55,7 @@ Use a Bloom filter for every user, storing all bought products. The recommendati - If no, the ad is shown to the user and is added to the Bloom filter. - If yes, the process restarts and repeats until it finds a product that is not present in the filter. -Using Redis Stack's Bloom filter for this type of application provides these benefits: +Using the Redis Bloom filter for this type of application provides these benefits: - Cost efficient way to a customized near real-time experience - No need to invest in expensive infrastructure @@ -71,7 +71,7 @@ Use a Bloom filter for every username that has signed up. A new user types in th The query time stays the same at scale. -Using Redis Stack's Bloom filter for this type of application provides these benefits: +Using the Redis Bloom filter for this type of application provides these benefits: - Very fast and efficient way to do a common operation - No need to invest in expensive infrastructure @@ -101,7 +101,7 @@ OK Note: there is always a chance that even with just a few items, there could be a false positive, meaning an item could "exist" even though it has not been explicitly added to the Bloom filter. For a more in depth understanding of the probabilistic nature of a Bloom filter, check out the blog posts linked at the bottom of this page. ## Reserving Bloom filters -With Redis Stack's Bloom filters most of the sizing work is done for you: +With the Redis Bloom filter, most of the sizing work is done for you: ``` BF.RESERVE {key} {error_rate} {capacity} [EXPANSION expansion] [NONSCALING] diff --git a/content/develop/data-types/probabilistic/configuration.md b/content/develop/data-types/probabilistic/configuration.md new file mode 100644 index 0000000000..b931f42da4 --- /dev/null +++ b/content/develop/data-types/probabilistic/configuration.md @@ -0,0 +1,174 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Redis probabilistic data structures support multiple configuration parameters. +linkTitle: Configuration +title: Configuration Parameters +weight: 100 +--- +{{< note >}} +As of Redis Community Edition (CE) 8.0, configuration parameters for the probabilistic data structures are now set in the following ways: +* At load time via your `redis.conf` file. +* At run time (where applicable) using the [`CONFIG SET`]({{< relref "/commands/config-set" >}}) command. + +Also, Redis CE 8.0 persists probabilistic configuration parameters just like any other configuration parameters (e.g., using the [`CONFIG REWRITE`]({{< relref "/commands/config-rewrite/" >}}) command). +{{< /note >}} + + +## Redis probabilistic data structure configuration parameters + +The following table summarizes which Bloom filter configuration parameters can be set at run-time, and compatibility with Redis Software and Redis Cloud. + +| Parameter name
(version < 8.0) | Parameter name
(version ≥ 8.0) | Run-time | Redis
Software | Redis
Cloud | +| :------- | :------- | :------- | :------- | :------- | +| ERROR_RATE | [bf-error-rate](#bf-error-rate) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| | [bf-expansion-factor](#bf-expansion-factor) | :white_check_mark: ||| +| INITIAL_SIZE | [bf-initial-size](#bf-initial-size) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | + +The following table summarizes which Cuckoo filter configuration parameters can be set at run-time, and compatibility with Redis Software and Redis Cloud. + +| Parameter name
(version < 8.0) | Parameter name
(version ≥ 8.0) | Run-time | Redis
Software | Redis
Cloud | +| :------- | :------- | :------- | :------- | :------- | +| | [cf-bucket-size](#cf-bucket-size) | :white_check_mark: ||| +| | [cf-initial-size](#cf-initial-size) | :white_check_mark: ||| +| | [cf-expansion-factor](#cf-expansion-factor) | :white_check_mark: ||| +| CF_MAX_EXPANSIONS | [cf-max-expansions](#cf-max-expansions) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| | [cf-max-iterations](#cf-max-iterations) | :white_check_mark: ||| + +{{< note >}} +Parameter names for Redis CE versions < 8.0, while deprecated, will still be supported in version 8.0. +{{< /note >}} + +--- + +{{< warning >}} +A filter should always be sized for the expected capacity and the desired error rate. +Using the `INSERT` family commands with the default values should be used in cases where many small filters exist and the expectation is most will remain at around the default sizes. +Not optimizing a filter for its intended use will result in degradation of performance and memory efficiency. +{{< /warning >}} + +## Default parameters for Bloom filters + +### bf-error-rate + +Default false positive rate for Bloom filters. + +Type: double + +Valid range: `(0 .. 1)`. Though the valid range is `(0 .. 1)` (corresponding to `> 0%` to `< 100%` false positive rate), any value greater than `0.25` is treated as `0.25`. + +Default: `0.01` + +### bf-expansion-factor + +Added in v8.0.0. + +Expansion factor for Bloom filters. + +Type: integer + +Valid range: `[0 .. 32768]`. + +Default: `2` + +### bf-initial-size + +Initial capacity for Bloom filters. + +Type: integer + +Valid range: `[1 .. 1048576]` + +Default: `100` + +## Default parameters for Cuckoo filters + +### cf-bucket-size + +Added in v8.0.0. + +The number of items in each Cuckoo filter bucket. + +Type: integer + +Valid range: `[1 .. 255]` + +Default: `2` + +### cf-initial-size + +Added in v8.0.0. + +Cuckoo filter initial capacity. + +Type: integer + +Valid range: `[2*cf-bucket-size .. 1048576]` + +Default: `1024` + +### cf-expansion-factor + +Added in v8.0.0. + +Expansion factor for Cuckoo filters. + +Type: integer + +Valid range: `[0 .. 32768]` + +Default: `1` + +### cf-max-expansions + +The maximum number of expansions for Cuckoo filters. + +Type: integer + +Valid range: `[1 .. 65535]` + +Default: `32` + +### cf-max-iterations + +Added in v8.0.0 + +The maximum number of iterations for Cuckoo filters. + +Type: integer + +Valid range: `[1 .. 65535]` + +Default: `20` + +## Setting configuration parameters on module load (deprecated) + +These methods are deprecated beginning with Redis CE v8.0.0. + +Setting configuration parameters at load-time is done by appending arguments after the `--loadmodule` argument when starting a server from the command line or after the `loadmodule` directive in a Redis config file. For example: + +In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): + +```sh +loadmodule ./redisbloom.so [OPT VAL]... +``` + +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: + +``` +127.0.0.6379> MODULE LOAD redisbloom.so [OPT VAL]... +``` + +From the command line: + +```sh +$ redis-server --loadmodule ./redisbloom.so [OPT VAL]... +``` \ No newline at end of file diff --git a/content/develop/data-types/probabilistic/count-min-sketch.md b/content/develop/data-types/probabilistic/count-min-sketch.md index 86d33e6fc1..0c59f31ea0 100644 --- a/content/develop/data-types/probabilistic/count-min-sketch.md +++ b/content/develop/data-types/probabilistic/count-min-sketch.md @@ -17,7 +17,7 @@ title: Count-min sketch weight: 60 --- -Count-Min Sketch is a probabilistic data structure in Redis Stack that can be used to estimate the frequency of events/elements in a stream of data. +Count-Min Sketch is a probabilistic data structure in Redis Community Edition that can be used to estimate the frequency of events/elements in a stream of data. It uses a sub-linear space at the expense of over-counting some events due to collisions. It consumes a stream of events/elements and keeps estimated counters of their frequency. diff --git a/content/develop/data-types/probabilistic/cuckoo-filter.md b/content/develop/data-types/probabilistic/cuckoo-filter.md index ba45ca4853..c297c9dfa9 100644 --- a/content/develop/data-types/probabilistic/cuckoo-filter.md +++ b/content/develop/data-types/probabilistic/cuckoo-filter.md @@ -17,7 +17,7 @@ title: Cuckoo filter weight: 20 --- -A Cuckoo filter, just like a Bloom filter, is a probabilistic data structure in Redis Stack that enables you to check if an element is present in a set in a very fast and space efficient way, while also allowing for deletions and showing better performance than Bloom in some scenarios. +A Cuckoo filter, just like a Bloom filter, is a probabilistic data structure in Redis Community Edition that enables you to check if an element is present in a set in a very fast and space efficient way, while also allowing for deletions and showing better performance than Bloom in some scenarios. While the Bloom filter is a bit array with flipped bits at positions decided by the hash function, a Cuckoo filter is an array of buckets, storing fingerprints of the values in one of the buckets at positions decided by the two hash functions. A membership query for item `x` searches the possible buckets for the fingerprint of `x`, and returns true if an identical fingerprint is found. A cuckoo filter's fingerprint size will directly determine the false positive rate. diff --git a/content/develop/data-types/probabilistic/t-digest.md b/content/develop/data-types/probabilistic/t-digest.md index ac56ea7384..32fe1823c6 100644 --- a/content/develop/data-types/probabilistic/t-digest.md +++ b/content/develop/data-types/probabilistic/t-digest.md @@ -17,7 +17,7 @@ title: t-digest weight: 40 --- -The t-digest is a sketch data structure in Redis Stack for estimating percentiles from a data stream or a large dataset using a compact sketch. +The t-digest is a sketch data structure in Redis Community Edition for estimating percentiles from a data stream or a large dataset using a compact sketch. It can answer questions like: - Which fraction of the values in the data stream are smaller than a given value? diff --git a/content/develop/data-types/probabilistic/top-k.md b/content/develop/data-types/probabilistic/top-k.md index 46acf533bd..00b581345d 100644 --- a/content/develop/data-types/probabilistic/top-k.md +++ b/content/develop/data-types/probabilistic/top-k.md @@ -17,14 +17,14 @@ title: Top-K weight: 50 --- -Top K is a probabilistic data structure in Redis Stack used to estimate the `K` highest-rank elements from a stream. +Top K is a probabilistic data structure in Redis Community Edition ("CE") used to estimate the `K` highest-rank elements from a stream. "Highest-rank" in this case means "elements with a highest number or score attached to them", where the score can be a count of how many times the element has appeared in the stream - thus making the data structure perfect for finding the elements with the highest frequency in a stream. One very common application is detecting network anomalies and DDoS attacks where Top K can answer the question: Is there a sudden increase in the flux of requests to the same address or from the same IP? There is, indeed, some overlap with the functionality of Count-Min Sketch, but the two data structures have their differences and should be applied for different use cases. -The Redis Stack implementation of Top-K is based on the [HeavyKeepers](https://www.usenix.org/conference/atc18/presentation/gong) algorithm presented by Junzhi Gong et al. It discards some older approaches like "count-all" and "admit-all-count-some" in favour of a "**count-with-exponential-decay**" strategy which is biased against mouse (small) flows and has a limited impact on elephant (large) flows. This implementation uses two data structures in tandem: a hash table that holds the probabilistic counts (much like the Count-Min Sketch), and a min heap that holds the `K` items with the highest counts. This ensures high accuracy with shorter execution times than previous probabilistic algorithms allowed, while keeping memory utilization to a fraction of what is typically required by a Sorted Set. It has the additional benefit of being able to get real time notifications when elements are added or removed from the Top K list. +The Redis CE implementation of Top-K is based on the [HeavyKeepers](https://www.usenix.org/conference/atc18/presentation/gong) algorithm presented by Junzhi Gong et al. It discards some older approaches like "count-all" and "admit-all-count-some" in favour of a "**count-with-exponential-decay**" strategy which is biased against mouse (small) flows and has a limited impact on elephant (large) flows. This implementation uses two data structures in tandem: a hash table that holds the probabilistic counts (much like the Count-Min Sketch), and a min heap that holds the `K` items with the highest counts. This ensures high accuracy with shorter execution times than previous probabilistic algorithms allowed, while keeping memory utilization to a fraction of what is typically required by a Sorted Set. It has the additional benefit of being able to get real time notifications when elements are added or removed from the Top K list. ## Use case diff --git a/content/develop/data-types/timeseries/_index.md b/content/develop/data-types/timeseries/_index.md index 93d8736c6b..9efaef60df 100644 --- a/content/develop/data-types/timeseries/_index.md +++ b/content/develop/data-types/timeseries/_index.md @@ -21,11 +21,9 @@ weight: 150 The Redis time series structure lets you store and query timestamped data points. -Redis time series is not available by default in the basic Redis server, so you -should install Redis Stack or Redis Enterprise, -both of which include time series and other useful modules. +Redis time series is available in Redis Community Edition, Redis Software, and Redis Cloud. See -[Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or +[Install Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or [Install Redis Enterprise]({{< relref "/operate/rs/installing-upgrading/install" >}}) for full installation instructions. diff --git a/content/develop/data-types/timeseries/configuration.md b/content/develop/data-types/timeseries/configuration.md index 12cc61646e..bf311626c7 100644 --- a/content/develop/data-types/timeseries/configuration.md +++ b/content/develop/data-types/timeseries/configuration.md @@ -9,60 +9,60 @@ categories: - oss - kubernetes - clients -description: 'RedisTimeSeries supports multiple module configuration parameters. All - of these parameters can only be set at load-time. - - ' +description: Redis time series support multiple configuration parameters. linkTitle: Configuration title: Configuration Parameters weight: 3 --- +{{< note >}} +As of Redis Community Edition 8.0, configuration parameters for the time series data structure are now set in the following ways: +* At load time via your `redis.conf` file. +* At run time (where applicable) using the [`CONFIG SET`]({{< relref "/commands/config-set" >}}) command. + +Also, Redis CE 8.0 persists probabilistic configuration parameters just like any other configuration parameters (e.g., using the [`CONFIG REWRITE`]({{< relref "/commands/config-rewrite/" >}}) command). +{{< /note >}} + +## Time series configuration parameters + +| Parameter name
(version < 8.0) | Parameter name
(version ≥ 8.0) | Run-time | Redis
Software | Redis
Cloud | +| :------- | :------- | :------- | :------- | :------- | +| CHUNK_SIZE_BYTES | [ts-chunk-size-bytes](#ts-chunk-size-bytes) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| COMPACTION_POLICY | [ts-compaction-policy](#ts-compaction-policy) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| DUPLICATE_POLICY | [ts-duplicate-policy](#ts-duplicate-policy) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| ENCODING | [ts-encoding](#ts-encoding) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| IGNORE_MAX_TIME_DIFF | [ts-ignore-max-time-diff](#ts-ignore-max-time-diff-and-ts-ignore-max-val-diff) | :white_check_mark: ||| +| IGNORE_MAX_VAL_DIFF | [ts-ignore-max-val-diff](#ts-ignore-max-time-diff-and-ts-ignore-max-val-diff) | :white_check_mark: ||| +| NUM_THREADS | [ts-num-threads](#ts-num-threads) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| RETENTION_POLICY | [ts-retention-policy](#ts-retention-policy) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| OSS_GLOBAL_PASSWORD | Deprecated in v8.0.0. Replace with the `masterauth` password. | :white_check_mark: ||| + +{{< note >}} +Parameter names for Redis CE versions < 8.0, while deprecated, will still be supported in version 8.0. +{{< /note >}} -## Setting configuration parameters on module load - -Setting configuration parameters at load-time is done by appending arguments after the `--loadmodule` argument when starting a server from the command line or after the `loadmodule` directive in a Redis config file. For example: - -In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): - -```sh -loadmodule ./redistimeseries.so [OPT VAL]... -``` - -From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: +--- -``` -127.0.0.6379> MODULE LOAD redistimeseries.so [OPT VAL]... -``` +### ts-chunk-size-bytes -From the command line: +Default initial allocation size, in bytes, for the data part of each new chunk. +This default value is applied to each new time series upon its creation. +Actual chunks may consume more memory. -```sh -$ redis-server --loadmodule ./redistimeseries.so [OPT VAL]... -``` +Type: integer -## RedisTimeSeries configuration parameters +Valid range: `[48 .. 1048576]`; must be a multiple of 8 -The following table summarizes which configuration parameters can be set at module load-time and run-time: +Default: `4096` -| Configuration Parameter | Load-time | Run-time | -| :------- | :----- | :----------- | -| [NUM_THREADS](#num_threads) (since RedisTimeSeries v1.6) | :white_check_mark: | :white_large_square: | -| [COMPACTION_POLICY](#compaction_policy) | :white_check_mark: | :white_large_square: | -| [RETENTION_POLICY](#retention_policy) | :white_check_mark: | :white_large_square: | -| [DUPLICATE_POLICY](#duplicate_policy) | :white_check_mark: | :white_large_square: | -| [ENCODING](#encoding) (since RedisTimeSeries v1.6) | :white_check_mark: | :white_large_square: | -| [CHUNK_SIZE_BYTES](#chunk_size_bytes) | :white_check_mark: | :white_large_square: | -| [OSS_GLOBAL_PASSWORD](#oss_global_password) (since RedisTimeSeries v1.8.4) | :white_check_mark: | :white_large_square: | -| [IGNORE_MAX_TIME_DIFF](#ignore_max_time_diff-and-ignore_max_val_diff) (since RedisTimeSeries v1.12) | :white_check_mark: | :white_large_square: | -| [IGNORE_MAX_VAL_DIFF](#ignore_max_time_diff-and-ignore_max_val_diff) (since RedisTimeSeries v1.12) | :white_check_mark: | :white_large_square: | +### ts-compaction-policy -### NUM_THREADS +Default compaction rules for newly created keys with [`TS.ADD`]({{< relref "/commands/ts.add/" >}}), [`TS.INCRBY`]({{< relref "/commands/ts.incrby/" >}}), and [`TS.DECRBY`]({{< relref "/commands/ts.decrby/" >}}). -The maximal number of per-shard threads for cross-key queries when using cluster mode (TS.MRANGE, TS.MREVRANGE, TS.MGET, and TS.QUERYINDEX). The value must be equal to or greater than 1. Note that increasing this value may either increase or decrease the performance! +Type: string -#### Default +Default: No compaction rules. -`3` +**Discussion** #### Example @@ -79,21 +79,22 @@ Note that `COMPACTION_POLICY` has no effect on keys created with [`TS.CREATE`]({ Each rule is separated by a semicolon (`;`), the rule consists of multiple fields that are separated by a colon (`:`): * Aggregation type: One of the following: - | aggregator | description | + + | Aggregator | Description | | ---------- | ---------------------------------------------------------------- | - | `avg` | arithmetic mean of all values | - | `sum` | sum of all values | - | `min` | minimum value | - | `max` | maximum value | - | `range` | difference between the highest and the lowest value | - | `count` | number of values | - | `first` | the value with the lowest timestamp in the bucket | - | `last` | the value with the highest timestamp in the bucket | - | `std.p` | population standard deviation of the values | - | `std.s` | sample standard deviation of the values | - | `var.p` | population variance of the values | - | `var.s` | sample variance of the values | - | `twa` | time-weighted average of all values (since RedisTimeSeries v1.8) | + | `avg` | Arithmetic mean of all values | + | `sum` | Sum of all values | + | `min` | Minimum value | + | `max` | Maximum value | + | `range` | Difference between the highest and the lowest value | + | `count` | Number of values | + | `first` | The value with the lowest timestamp in the bucket | + | `last` | The value with the highest timestamp in the bucket | + | `std.p` | Population standard deviation of the values | + | `std.s` | Sample standard deviation of the values | + | `var.p` | Population variance of the values | + | `var.s` | Sample variance of the values | + | `twa` | Time-weighted average of all values (since v1.8) | * Duration of each time bucket - number and the time representation (Example for one minute: `1M`, `60s`, or `60000m`) @@ -113,7 +114,7 @@ Each rule is separated by a semicolon (`;`), the rule consists of multiple field `0m`, `0s`, `0M`, `0h`, or `0d` means no expiration. -* (since RedisTimeSeries v1.8): +* (Since v1.8): Optional: Time bucket alignment - number and the time representation (Example for one minute: `1M`, `60s`, or `60000m`) @@ -139,14 +140,14 @@ When a compaction policy is defined, compaction rules will be created automatica _key_agg_dur_aln_ where _key_ is the key of the source time series, _agg_ is the aggregator (in uppercase), _dur_ is the bucket duration in milliseconds, and _aln_ is the time bucket alignment in milliseconds. Example: `key_SUM_60000_1000`. -Examples: +**Examples** - `max:1M:1h` - Aggregate using `max` over one-minute windows and retain the last hour - `twa:1d:0m:360M` - Aggregate daily [06:00 .. 06:00) using `twa`; no expiration -#### Default +### ts-duplicate-policy -No compaction rules. +The default policy for handling insertion ([`TS.ADD`]({{< relref "/commands/ts.add/" >}}) and [`TS.MADD`]({{< relref "/commands/ts.madd/" >}})) of multiple samples with identical timestamps, with one of the following values: #### Example @@ -182,101 +183,122 @@ Is policy for handling insertion ([`TS.ADD`]({{< relref "commands/ts.add/" >}}) | policy | description | | ---------- | ---------------------------------------------------------------- | - | `BLOCK` | ignore any newly reported value and reply with an error | - | `FIRST` | ignore any newly reported value | - | `LAST` | override with the newly reported value | - | `MIN` | only override if the value is lower than the existing value | - | `MAX` | only override if the value is higher than the existing value | + | `BLOCK` | Ignore any newly reported value and reply with an error | + | `FIRST` | Ignore any newly reported value | + | `LAST` | Override with the newly reported value | + | `MIN` | Only override if the value is lower than the existing value | + | `MAX` | Only override if the value is higher than the existing value | | `SUM` | If a previous sample exists, add the new sample to it so that the updated value is equal to (previous + new). If no previous sample exists, set the updated value equal to the new value. | -#### Precedence order +The default value is applied to each new time series upon its creation. + +Type: string + +Default: `BLOCK` + +**Precedence order** + Since the duplication policy can be provided at different levels, the actual precedence of the used policy will be: -1. [`TS.ADD`]({{< relref "commands/ts.add/" >}})'s `ON_DUPLICATE_policy` optional argument -2. Key-level policy (as set with [`TS.CREATE`]({{< relref "commands/ts.create/" >}})'s and [`TS.ALTER`]({{< relref "commands/ts.alter/" >}})'s `DUPLICATE_POLICY` optional argument) -3. The `DUPLICATE_POLICY` module configuration parameter -4. The default policy +1. [`TS.ADD`]({{< relref "/commands/ts.add/" >}})'s `ON_DUPLICATE_POLICY` optional argument. +1. Key-level policy, as set with [`TS.CREATE`]({{< relref "/commands/ts.create/" >}})'s and [`TS.ALTER`]({{< relref "/commands/ts.alter/" >}})'s `DUPLICATE_POLICY` optional argument. +1. The `ts-duplicate-policy` configuration parameter. +1. The default policy. -#### Default +### ts-encoding -The default policy is `BLOCK`. Both new and pre-existing keys will conform to this default policy. +Note: Before v1.6 this configuration parameter was named `CHUNK_TYPE`. -#### Example +Default chunk encoding for automatically created time series keys when [ts-compaction-policy](#ts-compaction-policy) is configured. -``` -$ redis-server --loadmodule ./redistimeseries.so DUPLICATE_POLICY LAST -``` +Type: string -### ENCODING +Valid values: `COMPRESSED`, `UNCOMPRESSED` -Default chunk encoding for automatically created keys when [COMPACTION_POLICY](#COMPACTION_POLICY) is configured. +Default: `COMPRESSED` -Possible values: `COMPRESSED`, `UNCOMPRESSED`. +### ts-ignore-max-time-diff and ts-ignore-max-val-diff -Note: Before RedisTimeSeries 1.6 this configuration parameter was named `CHUNK_TYPE`. +Default values for newly created keys. -#### Default +Types: +- `ts-ignore-max-time-diff`: integer +- `ts-ignore-max-val-diff`: double -`COMPRESSED` +Valid ranges: +- `ts-ignore-max-time-diff`: `[0 .. 9,223,372,036,854,775,807]` +- `ts-ignore-max-val-diff`: `[0 .. 1.7976931348623157e+308]` -#### Example +Defaults: +- `ts-ignore-max-time-diff`: 0 +- `ts-ignore-max-val-diff`: 0.0 -``` -$ redis-server --loadmodule ./redistimeseries.so COMPACTION_POLICY max:1m:1h; ENCODING COMPRESSED -``` +**Discussion** -### CHUNK_SIZE_BYTES +Many sensors report data periodically. Often, the difference between the measured value and the previous measured value is negligible and related to random noise or to measurement accuracy limitations. In such situations it may be preferable not to add the new measurement to the time series. -Default initial allocation size, in bytes, for the data part of each new chunk, for newly created time series. Actual chunks may consume more memory. +A new sample is considered a duplicate and is ignored if the following conditions are met: -#### Default +1. The time series is not a compaction. +1. The time series' `ts-duplicate-policy` is `LAST`. +1. The sample is added in-order (`timestamp ≥ max_timestamp`). +1. The difference of the current timestamp from the previous timestamp (`timestamp - max_timestamp`) is less than or equal to `ts-ignore-max-time-diff`. +1. The absolute value difference of the current value from the value at the previous maximum timestamp (`abs(value - value_at_max_timestamp`) is less than or equal to `ts-ignore-max-val-diff`. -4096 +where `max_timestamp` is the timestamp of the sample with the largest timestamp in the time series, and `value_at_max_timestamp` is the value at `max_timestamp`. -#### Example +### ts-num-threads -``` -$ redis-server --loadmodule ./redistimeseries.so COMPACTION_POLICY max:1m:1h; CHUNK_SIZE_BYTES 2048 -``` +The maximum number of per-shard threads for cross-key queries when using cluster mode ([`TS.MRANGE`]({{< relref "/commands/ts.mrange/" >}}), [`TS.MREVRANGE`]({{< relref "/commands/ts.mrevrange/" >}}), [`TS.MGET`]({{< relref "/commands/ts.mget/" >}}), and [`TS.QUERYINDEX`]({{< relref "/commands/ts.queryindex/" >}})). The value must be equal to or greater than `1`. Note that increasing this value may either increase or decrease the performance! -### OSS_GLOBAL_PASSWORD +Type: integer -Global Redis Community Edition cluster password used for connecting to other shards. +Valid range: `[1..16]` -#### Default +Redis CE default: `3` -Not set +Redis Software default: Set by plan, and automatically updates when you change your plan. -#### Example +Redis Cloud defaults: +- Flexible & Annual: Set by plan +- Free & Fixed: `1` -``` -$ redis-server --loadmodule ./redistimeseries.so OSS_GLOBAL_PASSWORD password -``` +### ts-retention-policy -### IGNORE_MAX_TIME_DIFF and IGNORE_MAX_VAL_DIFF +Default retention period, in milliseconds, for newly created keys. -Default values for newly created keys. +Type: integer -Many sensors report data periodically. Often, the difference between the measured value and the previous measured value is negligible and related to random noise or to measurement accuracy limitations. In such situations it may be preferable not to add the new measurement to the time series. +Valid range: `[0 .. 9,223,372,036,854,775,807]` -A new sample is considered a duplicate and is ignored if the following conditions are met: +Default: `0` -1. The time series is not a compaction; -1. The time series' `DUPLICATE_POLICY` IS `LAST`; -1. The sample is added in-order (`timestamp ≥ max_timestamp`); -1. The difference of the current timestamp from the previous timestamp (`timestamp - max_timestamp`) is less than or equal to `IGNORE_MAX_TIME_DIFF`; -1. The absolute value difference of the current value from the value at the previous maximum timestamp (`abs(value - value_at_max_timestamp`) is less than or equal to `IGNORE_MAX_VAL_DIFF`. +Retention period is the maximum age of samples compared to highest reported timestamp, per key. Samples are expired based solely on the difference between their timestamps and the timestamps passed to subsequent [`TS.ADD`]({{< relref "/commands/ts.add/" >}}), [`TS.MADD`]({{< relref "/commands/ts.madd/" >}}), [`TS.INCRBY`]({{< relref "/commands/ts.incrby/" >}}), and [`TS.DECRBY`]({{< relref "/commands/ts.decrby/" >}}) calls. -where `max_timestamp` is the timestamp of the sample with the largest timestamp in the time series, and `value_at_max_timestamp` is the value at `max_timestamp`. +The value `0` means no expiration. -#### Defaults +When both `ts-compaction-policy` and `ts-retention-policy` are specified, the retention of newly created compactions is according to the retention time specified in `ts-compaction-policy`. -`IGNORE_MAX_TIME_DIFF`: 0 +## Setting configuration parameters on module load (deprecated) -`IGNORE_MAX_VAL_DIFF`: 0.0 +These methods are deprecated beginning with Redis CE v8.0.0. -#### Example +Setting configuration parameters at load-time is done by appending arguments after the `--loadmodule` argument when starting a server from the command line or after the `loadmodule` directive in a Redis config file. For example: + +In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): +```sh +loadmodule ./redistimeseries.so [OPT VAL]... ``` -$ redis-server --loadmodule ./redistimeseries.so IGNORE_MAX_TIME_DIFF 1 IGNORE_MAX_VALUE_DIFF 0.1 + +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: + +``` +127.0.0.6379> MODULE LOAD redistimeseries.so [OPT VAL]... ``` + +From the command line: + +```sh +$ redis-server --loadmodule ./redistimeseries.so [OPT VAL]... +``` \ No newline at end of file diff --git a/content/develop/data-types/timeseries/quickstart.md b/content/develop/data-types/timeseries/quickstart.md index 098c3aad9a..76d3d04353 100644 --- a/content/develop/data-types/timeseries/quickstart.md +++ b/content/develop/data-types/timeseries/quickstart.md @@ -9,9 +9,7 @@ categories: - oss - kubernetes - clients -description: 'Quick Start Guide to Time Series - - ' +description: Quick Start Guide to Time Series linkTitle: Quickstart title: Quickstart weight: 2 @@ -19,7 +17,7 @@ weight: 2 ## Setup -You can get RedisTimeSeries setup in the cloud, in a Docker container or on your own machine. +You can get Redis Time Series setup in the cloud, in a Docker container, or on your own machine. ### Redis Cloud @@ -29,7 +27,7 @@ Redis Time Series are available on all Redis Cloud managed services, including a ### Docker -To quickly try out Redis Time Series, launch an instance of Redis Stack using docker: +To quickly try out Redis Time Series, launch an instance of Redis Community Edition using docker: ```sh docker run -p 6379:6379 -it --rm redis/redis-stack-server ``` diff --git a/content/develop/data-types/vector-sets/_index.md b/content/develop/data-types/vector-sets/_index.md new file mode 100644 index 0000000000..cf223ce794 --- /dev/null +++ b/content/develop/data-types/vector-sets/_index.md @@ -0,0 +1,40 @@ +--- +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: Introduction to Redis vector sets +linkTitle: Vector sets +title: Redis vector sets +weight: 55 +bannerText: Vector set is a new data type that is currently in preview and may be subject to change. +bannerChildren: true +--- + +Vector sets are a data type similar to sorted sets, but instead of a score, vector set elements have a string representation of a vector. +Vector sets allow you to add items to a set, and then either: + +* retrieve a subset of items that are the most similar to a specified vector, or +* retrieve a subset of items that are the most similar to the vector of an element that is already part of the vector set. + +Vector sets also provide for optional [filtered search]({{< relref "/develop/data-types/vector-sets/filtered-search" >}}). You can associate attributes with all or some elements in a vector set, and then use the `FILTER` option of the [`VSIM`]({{< relref "/commands/vsim" >}}) command to retrieve items similar to a given vector while applying simple mathematical filters to those attributes. Here's a sample filter: `".year > 1950"`. + +The following commands are available for vector sets: + +- [VADD]({{< relref "/commands/vadd" >}}) - add an element to a vector set, creating a new set if it didn't already exist. +- [VCARD]({{< relref "/commands/vcard" >}}) - retrieve the number of elements in a vector set. +- [VDIM]({{< relref "/commands/vdim" >}}) - retrieve the dimension of the vectors in a vector set. +- [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. +- [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. +- [VSETATTR]({{< relref "/commands/vsetattr" >}}) - set or replace attributes on a vector set element. +- [VSIM]({{< relref "/commands/vsim" >}}) - retrieve elements similar to a given vector or element with optional filtering. diff --git a/content/develop/data-types/vector-sets/filtered-search.md b/content/develop/data-types/vector-sets/filtered-search.md new file mode 100644 index 0000000000..396f550966 --- /dev/null +++ b/content/develop/data-types/vector-sets/filtered-search.md @@ -0,0 +1,119 @@ +--- +categories: +- docs +- develop +- stack +- rs +- rc +- oss +- kubernetes +- clients +description: Use filter expressions to refine vector similarity results with Redis vector sets +linkTitle: Filter expressions +title: Filter expressions +weight: 10 +--- + +## Overview + +Filtered search lets you combine vector similarity search with scalar filtering. You can associate JSON attributes with elements in a vector set, and then filter results using those attributes during [`VSIM`]({{< relref "/commands/vsim" >}}) queries. + +This allows queries such as: + +```bash +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.year >= 1980 and .rating > 7' +``` + +## Assigning attributes + +You can associate attributes when adding a new vector using the `SETATTR` argument: + +```bash +VADD vset VALUES 3 1 1 1 a SETATTR '{"year": 1950}' +``` + +Or update them later with the [`VSETATTR`]({{< relref "/commands/vsetattr" >}}) command: + +```bash +VSETATTR vset a '{"year": 1960}' +``` + +You can retrieve attributes with the [`VGETATTR`]({{< relref "/commands/vgetattr" >}}) command: + +```bash +VGETATTR vset a +``` + +## Filtering during similarity search + +To filter by attributes, pass the `FILTER` option to the [`VSIM`]({{< relref "/commands/vsim" >}}) command: + +```bash +VSIM vset VALUES 3 0 0 0 FILTER '.year > 1950' +``` + +This returns only elements that match both the vector similarity and the filter expression. + +## Expression syntax + +Expressions support familiar JavaScript-like syntax: + +- Arithmetic: `+`, `-`, `*`, `/`, `%`, `**` +- Comparison: `==`, `!=`, `>`, `<`, `>=`, `<=` +- Logical: `and`, `or`, `not` (or `&&`, `||`, `!`) +- Containment: `in` +- Grouping: Parentheses `()` + +Use dot notation to access attribute fields, for example, `.year`, `.rating`. + +> Only top-level fields are supported (for example, `.genre`, but not `.movie.genre`). + +## Supported data types + +- Numbers +- Strings +- Booleans (converted to 1 or 0) +- Arrays (for `in`) + +If a field is missing or invalid, the element is skipped without error. + +## FILTER-EF + +The `FILTER-EF` option controls how many candidate nodes the engine inspects to find enough filtered results. The defaults is `COUNT * 100`. + +```bash +VSIM vset VALUES 3 0 0 0 COUNT 10 FILTER '.year > 2000' FILTER-EF 500 +``` + +- Use a higher value for rare filters. +- Use `FILTER-EF 0` to scan as many as needed to fulfill the request. +- The engine will stop early if enough high-quality results are found. + +## Examples + +```bash +# Filter by year range +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.year >= 1980 and .year < 1990' + +# Filter by genre and rating +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.genre == "action" and .rating > 8.0' + +# Use IN with array +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.director in ["Spielberg", "Nolan"]' + +# Math and logic +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '(.year - 2000) ** 2 < 100 and .rating / 2 > 4' +``` + +## Tips + +- Missing attributes are treated as non-matching. +- Use `FILTER-EF` to tune recall vs performance. +- Combine multiple attributes for fine-grained filtering. + +## See also + +- [VSIM]({{< relref "/commands/vsim" >}}) +- [VADD]({{< relref "/commands/vadd" >}}) +- [VSETATTR]({{< relref "/commands/vsetattr" >}}) +- [VGETATTR]({{< relref "/commands/vgetattr" >}}) \ No newline at end of file diff --git a/content/develop/data-types/vector-sets/memory.md b/content/develop/data-types/vector-sets/memory.md new file mode 100644 index 0000000000..af56e9d44b --- /dev/null +++ b/content/develop/data-types/vector-sets/memory.md @@ -0,0 +1,88 @@ +--- +categories: +- docs +- develop +- stack +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how to optimize memory consumption in Redis vector sets +linkTitle: Memory optimization +title: Memory optimization +weight: 25 +--- + +## Overview + +Redis vector sets are efficient, but vector similarity indexing and graph traversal require memory tradeoffs. This guide helps you manage memory use through quantization, graph tuning, and attribute choices. + +## Quantization modes + +Vector sets support three quantization levels: + +| Mode | Memory usage | Recall | Notes | +|------------|---------------|--------|---------------------------------| +| `Q8` | 4x smaller | High | Default, fast and accurate | +| `BIN` | 32x smaller | Lower | Fastest, best for coarse search | +| `NOQUANT` | Full size | Highest| Best precision, slowest | + +Use `Q8` unless your use case demands either ultra-precision (use `NOQUANT`) or ultra-efficiency (use `BIN`). + +## Graph structure memory + +HNSW graphs store multiple connections per node. Each node: + +- Has an average of `M * 2 + M * 0.33` pointers (default M = 16). +- Stores pointers using 8 bytes each. +- Allocates ~1.33 layers per node. + +> A single node with M = 64 may consume ~1 KB in links alone. + +To reduce memory: + +- Lower `M` to shrink per-node connections. +- Avoid unnecessarily large values for `M` unless recall needs to be improved. + +## Attribute and label size + +Each node stores: + +- A string label (element name) +- Optional JSON attribute string + +Tips: + +- Use short, fixed-length strings for labels. +- Keep attribute JSON minimal and flat. For example, use `{"year":2020}` instead of nested data. + +## Vector dimension + +High-dimensional vectors increase storage: + +- 300 components at `FP32` = 1200 bytes/vector +- 300 components at `Q8` = 300 bytes/vector + +You can reduce this using the `REDUCE` option during [`VADD`]({{< relref "/commands/vadd" >}}), which applies random projection. + +```bash +VADD vset REDUCE 100 VALUES 300 ... item1 +``` + +This projects a 300-dimensional vector into 100 dimensions, reducing size and improving speed at the cost of some recall. + +## Summary + +| Strategy | Effect | +|---------------------|------------------------------------------| +| Use `Q8` | Best tradeoff for most use cases | +| Use `BIN` | Minimal memory, fastest search | +| Lower `M` | Shrinks HNSW link graph size | +| Reduce dimensions | Cuts memory per vector | +| Minimize JSON | Smaller attributes, less memory per node | + +## See also + +- [Performance]({{< relref "/develop/data-types/vector-sets/performance" >}}) +- [Scalability]({{< relref "/develop/data-types/vector-sets/scalability" >}}) diff --git a/content/develop/data-types/vector-sets/performance.md b/content/develop/data-types/vector-sets/performance.md new file mode 100644 index 0000000000..9b0f07ea17 --- /dev/null +++ b/content/develop/data-types/vector-sets/performance.md @@ -0,0 +1,73 @@ +--- +categories: +- docs +- develop +- stack +- rs +- rc +- oss +- kubernetes +- clients +description: Learn how Redis vector sets behave under load and how to optimize for speed and recall +linkTitle: Performance +title: Performance +weight: 15 +--- + +## Query performance + +Vector similarity queries using the [`VSIM`]({{< relref "/commands/vsim" >}}) are threaded by default. Redis uses up to 32 threads to process these queries in parallel. + +- `VSIM` performance scales nearly linearly with available CPU cores. +- Expect ~50,000 similarity queries per second for a 3M-item set with 300-dim vectors using int8 quantization. +- Performance depends heavily on the `EF` parameter: + - Higher `EF` improves recall, but slows down search. + - Lower `EF` returns faster results with reduced accuracy. + +## Insertion performance + +Inserting vectors with the [`VADD`]({{< relref "/commands/vadd" >}}) command is more computationally expensive than querying: + +- Insertion is single-threaded by default. +- Use the `CAS` option to offload candidate graph search to a background thread. +- Expect a few thousand insertions per second on a single node. + +## Quantization effects + +Quantization greatly impacts both speed and memory: + +- `Q8` (default): 4x smaller than `FP32`, high recall, high speed +- `BIN` (binary): 32x smaller than `FP32`, lower recall, fastest search +- `NOQUANT` (`FP32`): Full precision, slower performance, highest memory use + +Use the quantization mode that best fits your tradeoff between precision and efficiency. + +## Deletion performance + +Deleting large vector sets using the [`DEL`]({{< relref "/commands/del" >}}) can cause latency spikes: + +- Redis must unlink and restructure many graph nodes. +- Latency is most noticeable when deleting millions of elements. + +## Save and load performance + +Vector sets save and load the full HNSW graph structure: + +- When reloading from disk is fast and there's no need to rebuild the graph. + +Example: A 3M vector set with 300 components loads in ~15 seconds. + +## Summary of tuning tips + +| Factor | Effect on performance | Tip | +|------------|-------------------------------------|------------------------------------------------| +| `EF` | Slower queries but higher recall | Start low (for example, 200) and tune upward | +| `M` | More memory per node, better recall | Use defaults unless recall is too low | +| Quant type | Binary is fastest, `FP32` is slowest| Use `Q8` or `BIN` unless full precision needed | +| `CAS` | Faster insertions with threading | Use when high write throughput is needed | + +## See also + +- [Memory usage]({{< relref "/develop/data-types/vector-sets/memory" >}}) +- [Scalability]({{< relref "/develop/data-types/vector-sets/scalability" >}}) +- [Filtered search]({{< relref "/develop/data-types/vector-sets/filtered-search" >}}) diff --git a/content/develop/data-types/vector-sets/scalability.md b/content/develop/data-types/vector-sets/scalability.md new file mode 100644 index 0000000000..d1e9cfac15 --- /dev/null +++ b/content/develop/data-types/vector-sets/scalability.md @@ -0,0 +1,83 @@ +--- +categories: +- docs +- develop +- stack +- rs +- rc +- oss +- kubernetes +- clients +description: Scale Redis vector sets to handle larger data sets and workloads +linkTitle: Scalability +title: Scalability +weight: 20 +--- + +## Multi-instance scalability + +Vector sets can scale horizontally by sharding your data across multiple Redis instances. This is done by partitioning the dataset manually across keys and nodes. + +### Example strategy + +You can shard data using a consistent hash: + +```python +key_index = crc32(item) % 3 +key = f"vset:{key_index}" +``` + +Then add elements into different keys: + +```bash +VADD vset:0 VALUES 3 0.1 0.2 0.3 item1 +VADD vset:1 VALUES 3 0.4 0.5 0.6 item2 +``` + +To run a similarity search across all shards, send [`VSIM`]({{< relref "/commands/vsim" >}}) commands to each key and then merge the results client-side: + +```bash +VSIM vset:0 VALUES ... WITHSCORES +VSIM vset:1 VALUES ... WITHSCORES +VSIM vset:2 VALUES ... WITHSCORES +``` + +Then combine and sort the results by score. + +## Key properties + +- Write operations ([`VADD`]({{< relref "/commands/vadd" >}}), [`VREM`]({{< relref "/commands/vrem" >}})) scale linearly—you can insert in parallel across instances. +- Read operations ([`VSIM`]({{< relref "/commands/vsim" >}})) do not scale linearly—you must query all shards for a full result set. +- Smaller vector sets yield faster queries, so distributing them helps reduce query time per node. +- Merging results client-side keeps logic simple and doesn't add server-side overhead. + +## Availability benefits + +This sharding model also improves fault tolerance: + +- If one instance is down, you can still retrieve partial results from others. +- Use timeouts and partial fallbacks to increase resilience. + +## Latency considerations + +To avoid additive latency across N instances: + +- Send queries to all shards in parallel. +- Wait for the slowest response. + +This makes total latency close to the worst-case shard time, not the sum of all times. + +## Summary + +| Goal | Approach | +|---------------------------|---------------------------------------------------| +| Scale inserts | Split data across keys and instances | +| Scale reads | Query all shards and merge results | +| High availability | Accept partial results when some shards fail | +| Maintain performance | Use smaller shards for faster per-node traversal | + +## See also + +- [Performance]({{< relref "/develop/data-types/vector-sets/performance" >}}) +- [Filtered search]({{< relref "/develop/data-types/vector-sets/filtered-search" >}}) +- [Memory usage]({{< relref "/develop/data-types/vector-sets/memory" >}}) diff --git a/content/develop/data-types/vector-sets/troubleshooting.md b/content/develop/data-types/vector-sets/troubleshooting.md new file mode 100644 index 0000000000..eadaf8be4e --- /dev/null +++ b/content/develop/data-types/vector-sets/troubleshooting.md @@ -0,0 +1,102 @@ +--- +categories: +- docs +- develop +- stack +- rs +- rc +- oss +- kubernetes +- clients +description: Diagnose and debug issues when working with Redis vector sets +linkTitle: Troubleshooting +title: Troubleshooting +weight: 30 +--- + +## Common challenges + +Vector sets are approximate by design. That makes debugging trickier than with exact match queries. This section helps you understand issues with recall, filtering, and graph structure. + +## Low recall or missing results + +If [`VSIM`]({{< relref "/commands/vsim" >}}) doesn't return expected items: + +- Increase the `EF` parameter: + + ```bash + VSIM myset VALUES 3 ... COUNT 10 EF 1000 + ``` + +- Check quantization mode. Binary quantization (`BIN`) trades accuracy for speed. +- Use `TRUTH` to compare results against a linear scan: + + ```bash + VSIM myset VALUES 3 ... COUNT 10 TRUTH + ``` + + This gives you the most accurate results for validation, but it's slow. + +## Filtering issues + +Filters silently exclude items if: + +- A field is missing from the element’s attributes +- The JSON is invalid +- A type doesn’t match the expression (for example, `.rating > 8` when `.rating` is a string) + +Try retrieving the attributes with [`VGETATTR`]({{< relref "/commands/vgetattr" >}}): + +```bash +VGETATTR myset myelement +``` + +Double-check field names, JSON validity, and value types. + +## Unexpected memory usage + +Memory issues may arise from: + +- Large vectors (use `REDUCE` to project down) +- High `M` values inflating link graphs +- Large or deeply nested JSON attributes +- Storing raw `FP32` vectors (`NOQUANT`) + +Use default `Q8` quantization and compact attributes to save space. + +## Inspecting the graph + +Use [`VLINKS`]({{< relref "/commands/vlinks" >}}) to examine a node’s connections: + +```bash +VLINKS myset myelement WITHSCORES +``` + +- Helps you verify whether isolated or weakly connected nodes exist. +- Useful for explaining poor recall. + +## Deletion spikes + +Large sets deleted using the `DEL` command can briefly spike latency as Redis reclaims memory and rebuilds HNSW linkages. + +## Replication quirks + +- `VADD` with `REDUCE` does not replicate the random projection matrix. +- Replicas will produce different projected vectors for the same inputs. + +This doesn't affect similarity searches but does affect [`VEMB`]({{< relref "/commands/vemb" >}}) output. + +## Summary + +| Symptom | Try this | +|----------------------------------|-----------------------------------------------------------| +| Poor recall | Use higher `EF`, check quantization, use `TRUTH` | +| Filters exclude too much | Validate attributes with `VGETATTR`, simplify expressions | +| Memory spikes | Use `REDUCE`, `Q8`, smaller `M`, compact JSON | +| Replication mismatch with REDUCE | Avoid relying on projected vectors from replicas | + +## See also + +- [Filtered Search]({{< relref "/develop/data-types/vector-sets/filtered-search" >}}) +- [Memory Usage]({{< relref "/develop/data-types/vector-sets/memory" >}}) +- [Performance]({{< relref "/develop/data-types/vector-sets/performance" >}}) diff --git a/content/develop/get-started/data-store.md b/content/develop/get-started/data-store.md index 9b07eb281b..6b558122bc 100644 --- a/content/develop/get-started/data-store.md +++ b/content/develop/get-started/data-store.md @@ -92,7 +92,7 @@ SCAN 0 MATCH "bike:*" COUNT 100 ## Next steps -You can address more use cases with Redis by learning about Redis Stack. Here are two additional quick start guides: +You can address more use cases with Redis by reading these additional quick start guides: * [Redis as a document database]({{< relref "/develop/get-started/document-database" >}}) * [Redis as a vector database]({{< relref "/develop/get-started/vector-database" >}}) diff --git a/content/develop/get-started/document-database.md b/content/develop/get-started/document-database.md index 90765eca42..787a6ea063 100644 --- a/content/develop/get-started/document-database.md +++ b/content/develop/get-started/document-database.md @@ -37,21 +37,21 @@ The examples in this article refer to a simple bicycle inventory that contains J ## Setup -The easiest way to get started with [Redis Stack]({{< relref "/operate/oss_and_stack/" >}}) is to use Redis Cloud: +The easiest way to get started with [Redis]({{< relref "/operate/oss_and_stack/" >}}) is to use Redis Cloud: 1. Create a [free account](https://redis.com/try-free?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). 2. Follow the instructions to create a free database. -This free Redis Cloud database comes out of the box with all the Redis Stack features. +This free Redis Cloud database comes out of the box with all the Redis Community Edition features. -You can alternatively use the [installation guides]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) to install Redis Stack on your local machine. +You can alternatively use the [installation guides]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) to install Redis Community Edition on your local machine. ## Connect -The first step is to connect to your Redis Stack database. You can find further details about the connection options in this documentation site's [Tools section]({{< relref "/develop/tools" >}}). The following example shows how to connect to a Redis Stack server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): +The first step is to connect to your Redis Community Edition database. You can find further details about the connection options in this documentation site's [Tools section]({{< relref "/develop/tools" >}}). The following example shows how to connect to a Redis Community Edition server that runs on localhost (`-h 127.0.0.1`) and listens on the default port (`-p 6379`): {{< clients-example search_quickstart connect >}} > redis-cli -h 127.0.0.1 -p 6379 @@ -65,7 +65,7 @@ You can copy and paste the connection details from the Redis Cloud database conf ## Create an index -As explained in the [in-memory data store]({{< relref "/develop/get-started/data-store" >}}) quick start guide, Redis allows you to access an item directly via its key. You also learned how to scan the keyspace. Whereby you can use other data structures (e.g., hashes and sorted sets) as secondary indexes, your application would need to maintain those indexes manually. Redis Stack turns Redis into a document database by allowing you to declare which fields are auto-indexed. Redis Stack currently supports secondary index creation on the [hashes]({{< relref "/develop/data-types/hashes" >}}) and [JSON]({{< relref "/develop/data-types/json" >}}) documents. +As explained in the [in-memory data store]({{< relref "/develop/get-started/data-store" >}}) quick start guide, Redis allows you to access an item directly via its key. You also learned how to scan the keyspace. Whereby you can use other data structures (e.g., hashes and sorted sets) as secondary indexes, your application would need to maintain those indexes manually. Redis is a document database that allows you to declare which fields are auto-indexed. Redis currently supports secondary index creation on the [hashes]({{< relref "/develop/data-types/hashes" >}}) and [JSON]({{< relref "/develop/data-types/json" >}}) documents. The following example shows an [FT.CREATE]({{< relref "commands/ft.create" >}}) command that creates an index with some text fields, a numeric field (price), and a tag field (condition). The text fields have a weight of 1.0, meaning they have the same relevancy in the context of full-text searches. The field names follow the [JSONPath]({{< relref "/develop/data-types/json/path" >}}) notion. Each such index field maps to a property within the JSON document. @@ -173,7 +173,7 @@ Please see the [query documentation]({{< relref "/develop/interact/search-and-qu ## Next steps -You can learn more about how to use Redis Stack as a vector database in the following quick start guide: +You can learn more about how to use Redis Community Edition as a vector database in the following quick start guide: * [Redis as a vector database]({{< relref "/develop/get-started/vector-database" >}}) diff --git a/content/develop/get-started/vector-database.md b/content/develop/get-started/vector-database.md index 15411c7cc5..fea1bc77e6 100644 --- a/content/develop/get-started/vector-database.md +++ b/content/develop/get-started/vector-database.md @@ -46,7 +46,7 @@ Data is often unstructured, which means that it isn't described by a well-define ## Create a Redis vector database -You can use [Redis Stack]({{< relref "/operate/oss_and_stack/" >}}) as a vector database. It allows you to: +You can use [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) as a vector database. It allows you to: * Store vectors and the associated metadata within hashes or [JSON]({{< relref "/develop/data-types/json" >}}) documents * Create and configure secondary indices for search @@ -61,11 +61,9 @@ The easiest way to get started is to use Redis Cloud: 2. Follow the instructions to create a free database. -This free Redis Cloud database comes out of the box with all the Redis Stack features. +This free Redis Cloud database comes out of the box with all the Redis Community Edition features. -You can alternatively use the [installation guides]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) to install Redis Stack on your local machine. - -You need to have the following features configured for your Redis server: JSON and Search and query. +You can alternatively use the [installation guides]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) to install Redis on your local machine. ## Install the required Python packages @@ -87,7 +85,7 @@ Connect to Redis. By default, Redis returns binary responses. To decode them, yo {{< clients-example search_vss connect />}}
{{% alert title="Tip" color="warning" %}} -Instead of using a local Redis Stack server, you can copy and paste the connection details from the Redis Cloud database configuration page. Here is an example connection string of a Cloud database that is hosted in the AWS region `us-east-1` and listens on port 16379: `redis-16379.c283.us-east-1-4.ec2.cloud.redislabs.com:16379`. The connection string has the format `host:port`. You must also copy and paste the username and password of your Cloud database. The line of code for connecting with the default user changes then to `client = redis.Redis(host="redis-16379.c283.us-east-1-4.ec2.cloud.redislabs.com", port=16379, password="your_password_here", decode_responses=True)`. +Instead of using a local Redis server, you can copy and paste the connection details from the Redis Cloud database configuration page. Here is an example connection string of a Cloud database that is hosted in the AWS region `us-east-1` and listens on port 16379: `redis-16379.c283.us-east-1-4.ec2.cloud.redislabs.com:16379`. The connection string has the format `host:port`. You must also copy and paste the username and password of your Cloud database. The line of code for connecting with the default user changes then to `client = redis.Redis(host="redis-16379.c283.us-east-1-4.ec2.cloud.redislabs.com", port=16379, password="your_password_here", decode_responses=True)`. {{% /alert %}} diff --git a/content/develop/interact/search-and-query/_index.md b/content/develop/interact/search-and-query/_index.md index 396feb6379..f211cbf847 100644 --- a/content/develop/interact/search-and-query/_index.md +++ b/content/develop/interact/search-and-query/_index.md @@ -45,20 +45,16 @@ Here are the next steps to get you started: ## Enable the Redis Query Engine -The Redis Query Engine is not available by default in the basic Redis server, so you -should install Redis Stack or Redis Enterprise, -both of which include Redis search and other useful modules. +The Redis Query Engine is available in Redis Community Edition, Redis Software, and Redis Cloud. See -[Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or +[Install Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) or [Install Redis Enterprise]({{< relref "/operate/rs/installing-upgrading/install" >}}) for full installation instructions. ## License and source code -The Redis Query Engine features of Redis Stack are available under the Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1). Please read the [license file](https://raw.githubusercontent.com/RediSearch/RediSearch/master/LICENSE.txt) for further details. The source code and the [detailed release notes](https://github.com/RediSearch/RediSearch/releases) are available on [GitHub](https://github.com/RediSearch/RediSearch). +The Redis Query Engine features of Redis are available under the Source Available License 2.0 (RSALv2) or the Server Side Public License v1 (SSPLv1). Please read the [license file](https://raw.githubusercontent.com/RediSearch/RediSearch/master/LICENSE.txt) for further details. The source code and the [detailed release notes](https://github.com/RediSearch/RediSearch/releases) are available on [GitHub](https://github.com/RediSearch/RediSearch). Do you have questions? Feel free to ask at the [RediSearch forum](https://forum.redis.com/c/modules/redisearch/). -Redis Ltd. provides commercial support for Redis Stack. Please see the [Redis Ltd. website](https://redis.com/redis-enterprise/technology/redis-search/#sds) for more details and contact information. -
\ No newline at end of file diff --git a/content/develop/interact/search-and-query/administration/configuration.md b/content/develop/interact/search-and-query/administration/configuration.md new file mode 100644 index 0000000000..a08b44823b --- /dev/null +++ b/content/develop/interact/search-and-query/administration/configuration.md @@ -0,0 +1,587 @@ +--- +aliases: /develop/interact/search-and-query/basic-constructs/configuration-parameters +categories: +- docs +- develop +- stack +- oss +- rs +- rc +- oss +- kubernetes +- clients +description: 'Redis Query Engine can be tuned through multiple + configuration parameters. Some of these parameters can only be set at load-time, + while other parameters can be set either at load-time or at run-time.' +linkTitle: Configuration parameters +title: Configuration parameters +weight: 1 +--- +{{< note >}} +As of Redis Community Edition (CE) 8.0, configuration parameters for the time series data structure are now set in the following ways: +* At load time via your `redis.conf` file. +* At run time (where applicable) using the [`CONFIG SET`]({{< relref "/commands/config-set" >}}) command. + +Also, CE 8.0 persists probabilistic configuration parameters just like any other configuration parameters (e.g., using the [`CONFIG REWRITE`]({{< relref "/commands/config-rewrite/" >}}) command). +{{< /note >}} + +## Redis Query Engine configuration parameters + +The following table summarizes which configuration parameters can be set at run-time, and compatibility with Redis Software and Redis Cloud. + +| Parameter name
(version < 8.0) | Parameter name
(version ≥ 8.0) | Run-time | Redis
Software | Redis
Cloud | +| :------- | :------- | :------- | :------- | :------- | +| BG_INDEX_SLEEP_GAP | [search-bg-index-sleep-gap](#search-bg-index-sleep-gap) | :white_large_square: ||| +| CONCURRENT_WRITE_MODE | [search-concurrent-write-mode](#search-concurrent-write-mode) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| CONN_PER_SHARD | [search-conn-per-shard](#search-conn-per-shard) | :white_check_mark: ||| +| CURSOR_MAX_IDLE | [search-cursor-max-idle](#search-cursor-max-idle) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| CURSOR_READ_SIZE | [search-cursor-read-size](#search-cursor-read-size) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| CURSOR_REPLY_THRESHOLD | [search-cursor-reply-threshold](#search-cursor-reply-threshold) | :white_check_mark: ||| +| DEFAULT_DIALECT | [search-default-dialect](#search-default-dialect) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| EXTLOAD | [search-ext-load](#search-ext-load) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| FORK_GC_CLEAN_THRESHOLD | [search-fork-gc-clean-threshold](#search-fork-gc-clean-threshold) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| FORK_GC_RETRY_INTERVAL | [search-fork-gc-retry-interval](#search-fork-gc-retry-interval) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| FORK_GC_RUN_INTERVAL | [search-fork-gc-run-interval](#search-fork-gc-run-interval) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| FORKGC_SLEEP_BEFORE_EXIT | [search-fork-gc-sleep-before-exit](#search-fork-gc-sleep-before-exit) | :white_check_mark: ||| +| FRISOINI | [search-friso-ini](#search-friso-ini) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| [GC_POLICY](#gc_policy) | There is no matching `CONFIG` parameter. | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| GCSCANSIZE | [search-gc-scan-size](#search-gc-scan-size) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| INDEX_CURSOR_LIMIT | [search-index-cursor-limit](#search-index-cursor-limit) | :white_large_square: ||| +| INDEX_THREADS | search-index-threads | :white_large_square: ||| +| MAXAGGREGATERESULTS | [search-max-aggregate-results](#search-max-aggregate-results) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MAXDOCTABLESIZE | [search-max-doctablesize](#search-max-doctablesize) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MAXEXPANSIONS | [search-max-expansions](#search-max-expansions) | :white_check_mark: ||| +| MAXPREFIXEXPANSIONS | [search-max-prefix-expansions](#search-max-prefix-expansions) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MAXSEARCHRESULTS | [search-max-search-results](#search-max-search-results) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MIN_OPERATION_WORKERS | [search-min-operation-workers](#search-min-operation-workers) | :white_check_mark: ||| +| MIN_PHONETIC_TERM_LEN | [search-min-phonetic-term-len](#search-min-phonetic-term-len) | :white_check_mark: ||| +| MINPREFIX | [search-min-prefix](#search-min-prefix) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MINSTEMLEN | [search-min-stem-len](#search-min-stem-len) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| MULTI_TEXT_SLOP | [search-multi-text-slop](#search-multi-text-slop) | :white_large_square: ||| +| NO_MEM_POOLS | [search-no-mem-pools](#search-no-mem-pools) | :white_large_square: ||| +| NOGC | [search-no-gc](#search-no-gc) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| ON_TIMEOUT | [search-on-timeout](#search-on-timeout) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| PARTIAL_INDEXED_DOCS | [search-partial-indexed-docs](#search-partial-indexed-docs) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| RAW_DOCID_ENCODING | [search-raw-docid-encoding](#search-raw-docid-encoding) | :white_large_square: ||| +| SEARCH_THREADS | [search-threads](#search-threads) | :white_large_square: ||| +| TIERED_HNSW_BUFFER_LIMIT | [search-tiered-hnsw-buffer-limit](#search-tiered-hnsw-buffer-limit) | :white_large_square: ||| +| TIMEOUT | [search-timeout](#search-timeout) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| TOPOLOGY_VALIDATION_TIMEOUT | [search-topology-validation-timeout](#search-topology-validation-timeout) | :white_check_mark: ||| +| UNION_ITERATOR_HEAP | [search-union-iterator-heap](#search-union-iterator-heap) | :white_check_mark: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| UPGRADE_INDEX | [search-upgrade-index](#search-upgrade-index) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| VSS_MAX_RESIZE | [search-vss-max-resize](#search-vss-max-resize) | :white_check_mark: ||| +| WORKERS_PRIORITY_BIAS_THRESHOLD | [search-workers-priority-bias-threshold](#search-workers-priority-bias-threshold) | :white_large_square: ||| +| WORKERS | [search-workers](#search-workers) | :white_check_mark: ||| +| OSS_GLOBAL_PASSWORD | Deprecated in v8.0.0. Replace with the `masterauth` password. | :white_large_square: | ✅ Supported

| ❌ Flexible & Annual
❌ Free & Fixed | +| MT_MODE | Deprecated in v8.0.0. Use search-workers. | :white_large_square: ||| +| PRIVILEGED_THREADS_NUM | Deprecated in v8.0.0. Use search-workers-priority-bias-threshold.| :white_large_square: ||| +| WORKER_THREADS | Deprecated in v8.0.0. Use search-min-operation-workers. | :white_large_square: ||| +| SAFEMODE | Deprecated in v1.6.0. This is now the default setting. | :white_large_square: ||| +| FORK_GC_CLEAN_NUMERIC_EMPTY_NODES | Deprecated in v8.0.0. | :white_large_square: ||| + +{{< note >}} +Parameter names for Redis CE versions < 8.0, while deprecated, will still be supported in version 8.0. +{{< /note >}} + +--- + +### search-bg-index-sleep-gap + +The number of iterations to run while performing background indexing before `usleep(1)` (sleep for 1 microsecond) is called, ensuring that Redis can process other commands. + +Type: integer + +Valid range: `[1 .. 4294967295]` + +Default: `100` + +### search-concurrent-write-mode + +If enabled, the tokenization of write queries will be performed concurrently. + +Type: boolean + +Default: `FALSE` + +### search-conn-per-shard + +The number of connections to each shard in a cluster. +If `0`, the number of connections is set to `search-workers` + 1. + +Type: integer + +Valid range: `[0 .. 9,223,372,036,854,775,807]` + +Default: `0` + +### search-cursor-max-idle + +The maximum idle time (in ms) that can be set to the [cursor api]({{< relref "/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api" >}}). + +Type: integer + +Valid range: `[0 .. 9,223,372,036,854,775,807]` + +Default: `300000` + +### search-cursor-read-size + +Type: integer + +Default: `1000` + +### search-cursor-reply-threshold + +The maximum number of replies to accumulate before triggering `_FT.CURSOR READ` on the shards. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `1` + +### search-default-dialect + +The default +[DIALECT]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}) +to be used by [`FT.CREATE`]({{< relref "/commands/ft.create/" >}}), [`FT.AGGREGATE`]({{< relref "/commands/ft.aggregate/" >}}), [`FT.EXPLAIN`]({{< relref "/commands/ft.explain/" >}}), [`FT.EXPLAINCLI`]({{< relref "/commands/ft.explaincli/" >}}), and [`FT.SPELLCHECK`]({{< relref "/commands/ft.spellcheck/" >}}). +See [Query dialects]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}) +for more information. + +Default: `1` + +### search-ext-load + +If present, Redis will try to load an extension dynamic library from the specified file path. +See [Extensions]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}) for details. + +Type: string + +Default: not set + +### search-fork-gc-clean-numeric-empty-nodes + +Clean empty nodes from numeric tree. + +Type: boolean + +Default: `TRUE` + +### search-fork-gc-clean-threshold + +The fork GC will only start to clean when the number of uncleaned documents exceeds this threshold, otherwise it will skip this run. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `100` + +### search-fork-gc-retry-interval + +Interval (in seconds) in which Redis will retry to run fork GC in case of a failure. +This setting can only be combined with the [`search-gc-policy`](#search-gc-policy) `FORK` setting. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `5` + +### search-fork-gc-run-interval + +Interval (in seconds) between two consecutive fork GC runs. +This setting can only be combined with the [`search-gc-policy`](#search-gc-policy) `FORK` setting. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `30` + +### search-fork-gc-sleep-before-exit + +The number of seconds for the fork GC to sleep before exit. This value should always be set to 0 except when testing. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `0` + +### search-friso-ini + +If present, load the custom Chinese dictionary from the specified path. See [Using custom dictionaries]({{< relref "/develop/interact/search-and-query/advanced-concepts/chinese#using-custom-dictionaries" >}}) for more details. + +Type: string + +Default: not set + +### GC_POLICY + +The garbage collection policy. The two supported policies are: +* FORK: uses a forked thread for garbage collection (v1.4.1 and above). This is the default GC policy since v1.6.1 and is ideal for general purpose workloads. +* LEGACY: uses a synchronous, in-process fork. This is ideal for read-heavy and append-heavy workloads with very few updates/deletes. Deprecated in v2.6.0. + +Note: When `GC_POLICY` is set to `FORK`, it can be combined with the `search-fork-gc-run-interval` and `search-fork-gc-retry-interval` settings. + +Type: string + +Valid values: `FORK` or `DEFAULT` + +Default: `FORK` + +### search-gc-scan-size + +The bulk size of the internal GC used for cleaning up indexes. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Redis CE default: `100` + +Redis Software default: `-1` (unlimited) + +Redis Cloud defaults: +- Flexible & Annual: `-1` (unlimited) +- Free & Fixed: `10000` + +### search-index-cursor-limit + +Added in v2.10.8. + +The maximum number of cursors that can be opened, per shard, at any given time. Cursors can be opened by the user via [`FT.AGGREGATE WITHCURSOR`]({{< relref "/commands/ft.aggregate/" >}}). Cursors are also opened internally by the Redis Query Engine for long-running queries. Once `INDEX_CURSOR_LIMIT` is reached, any further attempts to open a cursor will result in an error. + +{{% alert title="Notes" color="info" %}} +* Caution should be used in modifying this parameter. Every open cursor results in additional memory usage. +* Cursor usage should be regulated first by use of [`FT.CURSOR DEL`]({{< relref "/commands/ft.cursor-del/" >}}) and/or [`MAXIDLE`]({{< relref "/commands/ft.aggregate/" >}}) prior to modifying `INDEX_CURSOR_LIMIT` +* See [Cursor API]({{< relref "/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api" >}}) for more details. +{{% /alert %}} + +Type: integer + +Default: `128` + +### search-max-aggregate-results + +The maximum number of results to be returned by the `FT.AGGREGATE` command if `LIMIT` is used. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Redis CE default: `-1` (unlimited) + +Redis Software default: `-1` (unlimited) + +Redis Cloud defaults: +- Flexible & Annual: `-1` (unlimited) +- Free & Fixed: `10000` + +### search-max-doctablesize + +The maximum size of the internal hash table used for storing documents. +Note: this configuration option doesn't limit the number of documents that can be stored. It only affects the hash table internal array maximum size. +Decreasing this property can decrease the memory overhead in cases where the index holds a small number of documents that are constantly updated. + +Type: integer + +Valid range: `[1 .. 18,446,744,073,709,551,615]` + +Default: `1000000` + +### search-max-expansions + +This parameter is an alias for [search-max-prefix-expansions](#search-max-prefix-expansions). + +### search-max-prefix-expansions + +The maximum number of expansions allowed for query prefixes. +The maximum number of expansions allowed for query prefixes. Setting it too high can cause performance issues. If `search-max-prefix-expansions` is reached, the query will continue with the first acquired results. The configuration is applicable for all affix queries including prefix, suffix, and infix (contains) queries. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `200` + +### search-max-search-results + +The maximum number of results to be returned by the `FT.SEARCH` command if `LIMIT` is used. Set it to `-1` to remove the limit. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Redis CE default: `1000000` + +Redis Software default: `1000000` + +Redis Cloud defaults: +- Flexible & Annual: `1000000` +- Free & Fixed: `10000` + +### search-min-operation-workers + +The number of worker threads to use for background tasks when the server is in an operation event. + +Type: integer + +Valid range: `[0 .. 8192]` + +Default: `4` + +### search-min-phonetic-term-len + +The minimum length of term to be considered for phonetic matching. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `3` + +### search-min-prefix + +The minimum number of characters allowed for prefix queries (e.g., hel*). Setting it to `1` can reduce performance. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `2` + +### search-min-stem-len + +The minimum word length to stem. Setting it lower than `4` can reduce performance. + +Type: integer + +Valid range: `[2 .. 4,294,967,295]` + +Redis CE default: `4` + +Redis Software and Redis Cloud default: `2` + +### search-multi-text-slop + +Set the delta that is used to increase positional offsets between array slots for multi text values. +This will allow you to control the level of separation between phrases in different array slots; related to the `SLOP` parameter of `FT.SEARCH` command. + +Type: integer + +Valid range: `[0 .. 4,294,967,295]` + +Default: `100` + +### search-no-mem-pools + +Set Redis Query Engine to run without memory pools. + +Type: boolean + +Default: `FALSE` + +### search-no-gc + +If set to `TRUE`, garbage collection is disabled for all indexes. + +Type: boolean + +Default: `FALSE` + +### search-on-timeout + +The response policy for queries that exceed the [`search-timeout`](#search-timeout) setting can be one of the following: + +* `RETURN`: this policy will return the top results accumulated by the query until it timed out. +* `FAIL`: will return an error when the query exceeds the timeout value. + +Type: string + +Valid values: `RETURN`, `FAIL` + +Default: `RETURN` + +### search-partial-indexed-docs + +Added in v2.0.0. + +Enable/disable the Redis command filter. The filter optimizes partial updates of hashes +and may avoid re-indexing the hash if changed fields are not part of the schema. + +The Redis command filter will be executed upon each Redis command. Though the filter is +optimized, this will introduce a small increase in latency on all commands. +This configuration is best used with partially indexed documents where the non-indexed fields are updated frequently. + +Type: integer + +Valid values: `0` (false), `1` (true) + +Default: `0` + +### search-raw-docid-encoding + +Disable compression for DocID inverted indexes to boost CPU performance. + +Type: boolean + +Default: `FALSE` + +### search-threads + +Sets the number of search threads in the coordinator thread pool. + +Type: integer + +### search-tiered-hnsw-buffer-limit + +Used for setting the buffer limit threshold for vector tiered HNSW indexes. If Redis is using `WORKERS` for indexing, and the number of vectors waiting in the buffer to be indexed exceeds this limit, new vectors are inserted directly into HNSW. + +Type: integer + +Valid range: `[0 .. 9,223,372,036,854,775,807]` + +Default: `1024` + +### search-timeout + +The maximum amount of time in milliseconds that a search query is allowed to run. If this time is exceeded, Redis returns the top results accumulated so far, or an error depending on the policy set with [`search-on-timeout`](#search-on-timeout). The timeout can be disabled by setting it to `0`. + +{{% alert title="Notes" color="info" %}} +* `search-timeout` refers to query time only. +* Parsing the query is not counted towards `search-timeout`. +* If `search-timeout` was not reached during the search, finalizing operations such as loading document content or reducers continue. +{{% /alert %}} + +Type: integer + +Value range: `[1 .. 9,223,372,036,854,775,807]` + +Redis CE default: `500` + +Redis Software default: `500` + +Redis Cloud defaults: +- Flexible & Annual: `500` +- Free & Fixed: `100` + +### search-topology-validation-timeout + +Sets the timeout in milliseconds for topology validation. After this timeout, any pending requests will be processed, even if the topology is not fully connected. A value of `0` means no timeout. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `30000` + +### search-union-iterator-heap + +The minimum number of iterators in a union at which the iterator will switch to a heap based implementation. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `20` + +### search-upgrade-index + +Relevant only when loading an v1.x RDB file. Specify the argument for upgrading the index. +This configuration setting is a special configuration option introduced to upgrade indexes from v1.x Redis Query Engine versions, otherwise known as legacy indexes. This configuration option needs to be given for each legacy index, followed by the index name and all valid options for the index description (also referred to as the `ON` arguments for following hashes) as described on [FT.CREATE]({{< relref "/commands/ft.create/" >}}) command page. + +Type: string + +Default: there is no default for index name, and the other arguments have the same defaults as with the [`FT.CREATE`]({{< relref "/commands/ft.create/" >}}) command. + +**Example** + +``` +search-upgrade-index idx PREFIX 1 tt LANGUAGE french LANGUAGE_FIELD MyLang SCORE 0.5 SCORE_FIELD MyScore + PAYLOAD_FIELD MyPayload UPGRADE_INDEX idx1 +``` + +{{% alert title="Notes" color="info" %}} +* If the RDB file does not contain a legacy index that's specified in the configuration, a warning message will be added to the log file, and loading will continue. +* If the RDB file contains a legacy index that wasn't specified in the configuration, loading will fail and the server won't start. +{{% /alert %}} + +### search-vss-max-resize + +Added in v2.4.8. + +The maximum memory resize (in bytes) for vector indexes. +The maximum memory resize (in bytes) for vector indexes. This value will override default memory limits if you need to allow for a large [`BLOCK_SIZE`]({{< relref "/develop/interact/search-and-query/advanced-concepts/vectors/#creation-attributes-per-algorithm" >}}). + +Type: integer + +Valid range: `[0 .. 4,294,967,295]` + +Default: `0` + +### search-workers-priority-bias-threshold + +The number of high priority tasks to be executed at any given time by the worker thread pool before executing low priority tasks. After this number of high priority tasks are being executed, the worker thread pool will execute high and low priority tasks alternately. + +Type: integer + +Valid range: `[1 .. 9,223,372,036,854,775,807]` + +Default: `1` + +### search-workers + +The number of worker threads to use for query processing and background tasks. + +Type: integer + +Valid range: `[0 .. 8192]` + +Default: `0` + +## Set configuration parameters at module load-time (deprecated) + +These methods are deprecated beginning with Redis CE v8.0.0. + +Setting configuration parameters at load-time is done by appending arguments after the `--loadmodule` argument when starting a server from the command line, or after the `loadmodule` directive in a Redis config file. For example: + +In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): + +``` +loadmodule ./redisearch.so [OPT VAL]... +``` + +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: + +``` +127.0.0.6379> MODULE LOAD redisearch.so [OPT VAL]... +``` + +From the command line: + +``` +$ redis-server --loadmodule ./redisearch.so [OPT VAL]... +``` + +## Set configuration parameters at run-time (for supported parameters, deprecated) + +These methods are deprecated beginning with Redis CE v8.0.0. + +Redis Query Engine exposes the `FT.CONFIG` endpoint to allow for the setting and retrieval of configuration parameters at run-time. + +To set the value of a configuration parameter at run-time (for supported parameters), simply run: + +```sh +FT.CONFIG SET OPT1 VAL1 +``` + +Similarly, you can retrieve current configuration parameter values using: + +```sh +FT.CONFIG GET OPT1 +FT.CONFIG GET * +``` + +Values set using [`FT.CONFIG SET`]({{< relref "/commands/ft.config-set/" >}}) are not persisted after server restart. \ No newline at end of file diff --git a/content/develop/interact/search-and-query/administration/design.md b/content/develop/interact/search-and-query/administration/design.md index 018ff5ffd0..2791100923 100644 --- a/content/develop/interact/search-and-query/administration/design.md +++ b/content/develop/interact/search-and-query/administration/design.md @@ -17,7 +17,7 @@ title: Internal design weight: 1 --- -Redis Stack implements inverted indexes on top of Redis, but unlike previous implementations of Redis inverted indexes, it uses a custom data encoding that allows more memory and CPU efficient searches, and more advanced search features. +Redis Community Edition ("CE") implements inverted indexes on top of Redis, but unlike previous implementations of Redis inverted indexes, it uses a custom data encoding that allows more memory and CPU efficient searches, and more advanced search features. This document details some of the design choices and how these features are implemented. @@ -41,7 +41,7 @@ An [inverted index](https://en.wikipedia.org/wiki/Inverted_index) is the data st When a search is performed, either a single index is traversed, or the intersection or union of two or more indexes is traversed. Classic Redis implementations of search engines use sorted sets as inverted indexes. This works but has significant memory overhead, and it also does not allow for encoding of offsets, as explained above. -Redis Stack uses string DMA (see above) to efficiently encode inverted indexes. It combines [delta encoding](https://en.wikipedia.org/wiki/Delta_encoding) and [varint encoding](https://developers.google.com/protocol-buffers/docs/encoding#varints) to encode entries, minimizing space used for indexes, while keeping decompression and traversal efficient. +Redis CE uses string DMA (see above) to efficiently encode inverted indexes. It combines [delta encoding](https://en.wikipedia.org/wiki/Delta_encoding) and [varint encoding](https://developers.google.com/protocol-buffers/docs/encoding#varints) to encode entries, minimizing space used for indexes, while keeping decompression and traversal efficient. For each hit (document/word entry), the following items are encoded: @@ -134,7 +134,7 @@ As of release 0.6, the implementation uses a multi-level range tree, saving rang 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 Stack 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. +Redis CE 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. However, since searching for fuzzy prefixes, especially very short ones, will traverse an enormous amount of suggestions (in fact, fuzzy suggestions for any single letter will traverse the entire dictionary!), it is recommended that you use this feature carefully, and only when considering the performance penalty it incurs. Since Redis is single threaded, blocking it for any amount of time means no other queries can be processed at that time. diff --git a/content/develop/interact/search-and-query/administration/overview.md b/content/develop/interact/search-and-query/administration/overview.md index 72911debac..213c2724db 100644 --- a/content/develop/interact/search-and-query/administration/overview.md +++ b/content/develop/interact/search-and-query/administration/overview.md @@ -9,7 +9,7 @@ categories: - oss - kubernetes - clients -description: 'Technical overview of the search and query features of Redis Stack' +description: 'Technical overview of the search and query features of Redis Community Edition' linkTitle: Technical overview title: Technical overview weight: 1 @@ -17,15 +17,15 @@ weight: 1 ## Abstract -RediSearch is a powerful text search and secondary indexing engine that is built on top of Redis as a Redis module. +Redis Query Engine ("RQE") is a powerful text search and secondary indexing engine that is built on top of Redis Community Edition. Unlike other Redis search libraries, it does not use the internal data structures of Redis such as sorted sets. Using its own highly optimized data structures and algorithms, it allows for advanced search features, high performance, and a low memory footprint. It can perform simple text searches, as well as complex structured queries, filtering by numeric properties and geographical distances. -RediSearch supports continuous indexing with no performance degradation, maintaining concurrent loads of querying and indexing. This makes it ideal for searching frequently updated databases without the need for batch indexing and service interrupts. +RQE supports continuous indexing with no performance degradation, maintaining concurrent loads of querying and indexing. This makes it ideal for searching frequently updated databases without the need for batch indexing and service interrupts. -The Enterprise version of RediSearch supports scaling the search engine across many servers, allowing it to easily grow to billions of documents on hundreds of servers. +The Enterprise version of RQE supports scaling the search engine across many servers, allowing it to easily grow to billions of documents on hundreds of servers. -All of this is done while taking advantage of Redis's robust architecture and infrastructure. Using Redis's protocol, replication, persistence, and clustering, RediSearch delivers a powerful yet simple to manage and maintain search and indexing engine that can be used as a standalone database, or to augment existing Redis databases with advanced powerful indexing capabilities. +All of this is done while taking advantage of Redis's robust architecture and infrastructure. Using Redis's protocol, replication, persistence, and clustering, RQE delivers a powerful yet simple to manage and maintain search and indexing engine that can be used as a standalone database, or to augment existing Redis databases with advanced powerful indexing capabilities. --- @@ -57,7 +57,7 @@ All of this is done while taking advantage of Redis's robust architecture and in ## Indexing documents -Redis Stack needs to know how to index documents in order to search effectively. A document may have several fields, each with its own weight. For example, a title is usually more important than the text itself. The engine can also use numeric or geographical fields for filtering. Hence, the first step is to create the index definition, which tells Redis Stack how to treat the documents that will be added. For example, to define an index of products, indexing their title, description, brand, and price fields, the index creation would look like: +Redis needs to know how to index documents in order to search effectively. A document may have several fields, each with its own weight. For example, a title is usually more important than the text itself. The engine can also use numeric or geographical fields for filtering. Hence, the first step is to create the index definition, which tells Redis how to treat the documents that will be added. For example, to define an index of products, indexing their title, description, brand, and price fields, the index creation would look like: ``` FT.CREATE idx PREFIX 1 doc: SCHEMA @@ -77,7 +77,7 @@ HSET doc:1 price 300 ``` -This tells Redis Stack to take the document, break each field into its terms (tokenization), and index it by marking the index for each of the terms in the index as contained in this document. Thus, the product is added immediately to the index and can now be found in future searches. +This tells Redis to take the document, break each field into its terms (tokenization), and index it by marking the index for each of the terms in the index as contained in this document. Thus, the product is added immediately to the index and can now be found in future searches. ## Searching @@ -88,23 +88,23 @@ Now that the products have been added to our index, searching is very simple: FT.SEARCH idx "full hd tv" ``` -This will tell Redis Stack to intersect the lists of documents for each term and return all documents containing the three terms. Of course, more complex queries can be performed, and the full syntax of the query language is detailed below. +This will tell Redis to intersect the lists of documents for each term and return all documents containing the three terms. Of course, more complex queries can be performed, and the full syntax of the query language is detailed below. ## Data structures -Redis Stack uses its own custom data structures and uses Redis' native structures only for storing the actual document content (using Hash objects). +Redis uses its own custom data structures and uses Redis' native structures only for storing the actual document content (using Hash objects). Using specialized data structures allows faster searches and more memory effective storage of index records, utilizing compression techniques like delta encoding. -These are the data structures Redis Stack uses under the hood: +These are the data structures Redis uses under the hood: ### Index and document metadata For each search _index_, there is a root data structure containing the schema, statistics, etc., but most importantly, compact metadata about each document indexed. -Internally, inside the index, Redis Stack uses delta encoded lists of numeric, incremental, 32-bit document ids. This means that the user given keys or ids for documents, need to be replaced with the internal ids on indexing, and back to the original ids on search. +Internally, inside the index, Redis uses delta encoded lists of numeric, incremental, 32-bit document ids. This means that the user given keys or ids for documents, need to be replaced with the internal ids on indexing, and back to the original ids on search. -For that, Redis Stack saves two tables, mapping the two kinds of ids in two ways (one table uses a compact trie, the other is simply an array where the internal document ID is the array index). On top of that, for each document, its user given presumptive score is stored, along with some status bits and any optional payload attached to the document by the user. +For that, Redis saves two tables, mapping the two kinds of ids in two ways (one table uses a compact trie, the other is simply an array where the internal document ID is the array index). On top of that, for each document, its user given presumptive score is stored, along with some status bits and any optional payload attached to the document by the user. Accessing the document metadata table is an order of magnitude faster than accessing the hash object where the document is actually saved, so scoring functions that need to access metadata about the document can operate fast enough. @@ -223,11 +223,11 @@ And negative clauses can also be added to filter out plasma and CRT TVs: ## Scoring model -Redis Stack comes with a few very basic scoring functions to evaluate document relevance. They are all based on document scores and term frequency. This is regardless of the ability to use sortable fields (see below). Scoring functions are specified by adding the `SCORER {scorer_name}` argument to a search request. +Redis comes with a few very basic scoring functions to evaluate document relevance. They are all based on document scores and term frequency. This is regardless of the ability to use sortable fields (see below). Scoring functions are specified by adding the `SCORER {scorer_name}` argument to a search request. If you prefer a custom scoring function, it is possible to add more functions using the [extension API]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}). -These are the pre-bundled scoring functions available in Redis Stack: +These are the pre-bundled scoring functions available in Redis: * **TFIDF** (default) @@ -268,7 +268,7 @@ FT.SEARCH users "john lennon" SORTBY age DESC ## Result highlighting and summarization -Redis Stack uses advanced algorithms for highlighting and summarizing, which enable only the relevant portions of a document to appear in response to a search query. This feature allows users to immediately understand the relevance of a document to their search criteria, typically highlighting the matching terms in bold text. The syntax is as follows: +Redis uses advanced algorithms for highlighting and summarizing, which enable only the relevant portions of a document to appear in response to a search query. This feature allows users to immediately understand the relevance of a document to their search criteria, typically highlighting the matching terms in bold text. The syntax is as follows: ``` FT.SEARCH ... @@ -283,15 +283,15 @@ Highlighting will highlight the found term and its variants with a user-defined ## Autocomplete -Another important feature for Redis Stack 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. +Another important feature for Redis CE 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. -Redis Stack 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. +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. However, searching for fuzzy prefixes (especially very short ones) will traverse an enormous number of suggestions. In fact, fuzzy suggestions for any single letter will traverse the entire dictionary, so the recommendation is to use this feature carefully and in full consideration of the performance penalty it incurs. -Redis Stack's autocomplete engine supports Unicode, allowing for fuzzy matches in non-latin languages as well. +The autocomplete engine supports Unicode, allowing for fuzzy matches in non-latin languages as well. See the [autocomplete page]({{< relref "/develop/interact/search-and-query/advanced-concepts/autocomplete" >}}) for more information and examples. @@ -299,11 +299,11 @@ See the [autocomplete page]({{< relref "/develop/interact/search-and-query/advan ### The Redis module API -RediSearch is implemented using the [Redis module API]({{< relref "/develop/reference/modules/" >}}) and is loaded into Redis as an extension module at start-up. +RQE is implemented using the [Redis module API]({{< relref "/develop/reference/modules/" >}}) and is loaded into Redis as an extension module at start-up. Redis modules make it possible to extend Redis's core functionality, implementing new Redis commands, data structures, and capabilities with similar performance to native core Redis itself. Redis modules are dynamic libraries that can be loaded into Redis at start-up or loaded at run-time using the [`MODULE LOAD`]({{< relref "/commands/module-load" >}}) command. Redis exports a C API, in the form of a single C header file called `redismodule.h`. -While the logic of RediSearch and its algorithms are mostly independent, and it could be ported quite easily to run as a stand-alone server, it still takes advantage of Redis as a robust infrastructure for a database server. Building on top of Redis means that, by default, modules are afforded: +While the logic of RQE and its algorithms are mostly independent, and it could be ported quite easily to run as a stand-alone server, it still takes advantage of Redis as a robust infrastructure for a database server. Building on top of Redis means that, by default, modules are afforded: * A high performance network protocol server * Robust replication @@ -312,7 +312,7 @@ While the logic of RediSearch and its algorithms are mostly independent, and it ### Query execution engine -Redis Stack uses a high-performance flexible query processing engine that can evaluate very complex queries in real time. +Redis uses a high-performance flexible query processing engine that can evaluate very complex queries in real time. The above query language is compiled into an execution plan that consists of a tree of index iterators or filters. These can be any of: @@ -333,17 +333,17 @@ The resulting matching documents are then fed to a post-processing chain of resu ### Concurrent updates and searches -While RediSearch is extremely fast and uses highly optimized data structures and algorithms, it was facing the same problem with regards to concurrency. Depending on the size of your data set and the cardinality of search queries, queries can take anywhere between a few microseconds to hundreds of milliseconds, or even seconds in extreme cases. When that happens, the entire Redis server process is blocked. +While RQE is extremely fast and uses highly optimized data structures and algorithms, it was facing the same problem with regards to concurrency. Depending on the size of your data set and the cardinality of search queries, queries can take anywhere between a few microseconds to hundreds of milliseconds, or even seconds in extreme cases. When that happens, the entire Redis server process is blocked. Think, for example, of a full-text query intersecting the terms "hello" and "world", each with a million entries, and a half-million common intersection points. To perform that query in a millisecond, Redis would have to scan, intersect, and rank each result in one nanosecond, [which is impossible with current hardware](https://gist.github.com/jboner/2841832). The same goes for indexing a 1,000 word document. It blocks Redis entirely for the duration of the query. -RediSearch uses the Redis Module API's concurrency features to avoid stalling the server for long periods of time. The idea is simple - while Redis itself is single-threaded, a module can run many threads, and any one of those threads can acquire the **Global Lock** when it needs to access Redis data, operate on it, and release it. +RQE uses the Redis Module API's concurrency features to avoid stalling the server for long periods of time. The idea is simple - while Redis itself is single-threaded, a module can run many threads, and any one of those threads can acquire the **Global Lock** when it needs to access Redis data, operate on it, and release it. Redis cannot be queried in parallel, as only one thread can acquire the lock, including the Redis main thread, but care is taken to make sure that a long-running query will give other queries time to run by yielding this lock from time to time. The following design principles were adopted to allow concurrency: -1. RediSearch has a thread pool for running concurrent search queries. +1. RQE has a thread pool for running concurrent search queries. 2. When a search request arrives, it is passed to the handler, parsed on the main thread, and then a request object is passed to the thread pool via a queue. @@ -361,14 +361,14 @@ Thus the operating system's scheduler makes sure all query threads get CPU time ### Index garbage collection -RediSearch is optimized for high write, update, and delete throughput. One of the main design choices dictated by this goal is that deleting and updating documents do not actually delete anything from the index: +RQE is optimized for high write, update, and delete throughput. One of the main design choices dictated by this goal is that deleting and updating documents do not actually delete anything from the index: 1. Deletion simply marks the document deleted in a global document metadata table using a single bit. 2. Updating, on the other hand, marks a document as deleted, assigns it a new incremental document ID, and re-indexes the document under a new ID, without performing a comparison of the change. What this means, is that index entries belonging to deleted documents are not removed from the index, and can be seen as garbage. Over time, an index with many deletes and updates will contain mostly garbage, both slowing things down and consuming unnecessary memory. -To overcome this, RediSearch employs a background garbage collection (GC) mechanism. During normal operation of the index, a special thread randomly samples indexes, traverses them, and looks for garbage. Index sections containing garbage are cleaned and memory is reclaimed. This is done in a non- intrusive way, operating on very small amounts of data per scan, and utilizing Redis's concurrency mechanism (see above) to avoid interrupting searches and indexing. The algorithm also tries to adapt to the state of the index, increasing the GC's frequency if the index contains a lot of garbage, and decreasing it if it doesn't, to the point of hardly scanning if the index does not contain garbage. +To overcome this, RQE employs a background garbage collection (GC) mechanism. During normal operation of the index, a special thread randomly samples indexes, traverses them, and looks for garbage. Index sections containing garbage are cleaned and memory is reclaimed. This is done in a non- intrusive way, operating on very small amounts of data per scan, and utilizing Redis's concurrency mechanism (see above) to avoid interrupting searches and indexing. The algorithm also tries to adapt to the state of the index, increasing the GC's frequency if the index contains a lot of garbage, and decreasing it if it doesn't, to the point of hardly scanning if the index does not contain garbage. ### Extension model @@ -379,13 +379,13 @@ There are two kinds of extension APIs at the moment: 1. **Query expanders**, whose role is to expand query tokens (i.e., stemmers). 2. **Scoring functions**, whose role is to rank search results at query time. -Extensions are compiled into dynamic libraries and loaded into RediSearch on initialization of the module. The mechanism is based on the code of Redis's own module system, albeit far simpler. +Extensions are compiled into dynamic libraries and loaded into RQE on initialization of the module. The mechanism is based on the code of Redis's own module system, albeit far simpler. --- ## Scalable distributed search -While RediSearch is very fast and memory efficient, if an index is big enough, at some point it will be too slow or consume too much memory. It must then be scaled out and partitioned over several machines, each of which will hold a small part of the complete search index. +While RQE is very fast and memory efficient, if an index is big enough, at some point it will be too slow or consume too much memory. It must then be scaled out and partitioned over several machines, each of which will hold a small part of the complete search index. Traditional clusters map different keys to different shards to achieve this. However, with search indexes this approach is not practical. If each word’s index was mapped to a different shard, it would be necessary to intersect records from different servers for multi-term queries. diff --git a/content/develop/interact/search-and-query/advanced-concepts/_index.md b/content/develop/interact/search-and-query/advanced-concepts/_index.md index 1fae7d0176..c4d72551c5 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/_index.md +++ b/content/develop/interact/search-and-query/advanced-concepts/_index.md @@ -16,7 +16,7 @@ title: Advanced concepts weight: 7 --- -Redis Stack supports the following Redis Query Engine features. This article provides you an overview. +Redis Community Edition supports the following Redis Query Engine features. This article provides you an overview. ## Indexing features @@ -54,10 +54,10 @@ Redis Stack supports the following Redis Query Engine features. This article pro ## Cluster support -The Redis Query Engine features of Redis Stack are also available for distributed databases that can scale to billions of documents and hundreds of servers. +The Redis Query Engine features of Redis Community Edition are also available for distributed databases that can scale to billions of documents and hundreds of servers. ## Supported platforms -Redis Stack is developed and tested on Linux and macOS on x86_64 CPUs. +Redis Community Edition is developed and tested on Linux and macOS on x86_64 CPUs. Atom CPUs are not supported. diff --git a/content/develop/interact/search-and-query/advanced-concepts/aggregations.md b/content/develop/interact/search-and-query/advanced-concepts/aggregations.md index bfab14d021..ec5f7741aa 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/aggregations.md +++ b/content/develop/interact/search-and-query/advanced-concepts/aggregations.md @@ -73,7 +73,7 @@ FT.AGGREGATE Parameters that can take a variable number of arguments are expressed in the form of `param {nargs} {property_1... property_N}`. The first argument to the parameter is the number of arguments following the parameter. This allows -Redis Stack to avoid a parsing ambiguity in case one of your arguments has the +Redis to avoid a parsing ambiguity in case one of your arguments has the name of another parameter. For example, to sort by first name, last name, and country, one would specify `SORTBY 6 firstName ASC lastName DESC country ASC`. @@ -570,5 +570,5 @@ Note that cursors are automatically deleted if all their results have been returned, or if they have timed out. All idle cursors can be forcefully purged at the same time using `FT.CURSOR GC idx 0` command. -By default, Redis Stack uses a lazy throttled approach to garbage collection, which +By default, Redis uses a lazy throttled approach to garbage collection, which collects idle cursors every 500 operations, or every second, whichever is later. diff --git a/content/develop/interact/search-and-query/advanced-concepts/chinese.md b/content/develop/interact/search-and-query/advanced-concepts/chinese.md index 8eb9f30649..2fabc5128a 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/chinese.md +++ b/content/develop/interact/search-and-query/advanced-concepts/chinese.md @@ -9,7 +9,7 @@ categories: - oss - kubernetes - clients -description: Chinese support for searching and querying in Redis Stack +description: Chinese support for searching and querying in Redis Community Edition linkTitle: Chinese title: Chinese support weight: 15 @@ -29,7 +29,7 @@ Chinese tokenization is done by scanning the input text and checking every character or sequence of characters against a dictionary of predefined terms, and determining the most likely match based on the surrounding terms and characters. -Redis Stack makes use of the [Friso](https://github.com/lionsoul2014/friso) +Redis makes use of the [Friso](https://github.com/lionsoul2014/friso) Chinese tokenization library for this purpose. This is largely transparent to the user and often no additional configuration is required. diff --git a/content/develop/interact/search-and-query/advanced-concepts/dialects.md b/content/develop/interact/search-and-query/advanced-concepts/dialects.md index 847af9775b..c8dfaecb59 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/dialects.md +++ b/content/develop/interact/search-and-query/advanced-concepts/dialects.md @@ -15,17 +15,20 @@ title: Query dialects weight: 5 --- -Redis Stack currently supports four query dialects for use with the [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}), [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}), and other Redis Query Engine commands. +Redis Community Edition (CE) currently supports four query dialects for use with the [`FT.SEARCH`]({{< relref "/commands/ft.search/" >}}), [`FT.AGGREGATE`]({{< relref "/commands/ft.aggregate/" >}}), and other Redis Query Engine commands. Dialects provide for enhancing the query API incrementally, introducing innovative behaviors and new features that support new use cases in a way that does not break the API for existing applications. -## `DIALECT 1` +{{< note >}}Dialects 1, 3, and 4 are deprecated in CE version 8. However, DIALECT 1 remains the default. +{{< /note >}} + +## `DIALECT 1` (Deprecated) Dialect version 1 was the default query syntax dialect from the first release of search and query until dialect version 2 was introduced with version [2.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.4.3). This dialect is also the default dialect. See below for information about changing the default dialect. ## `DIALECT 2` -Dialect version 2 was introduced in the [2.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.4.3) release to address query parser inconsistencies found in previous versions of Redis Stack. Dialect version 1 remains the default dialect. To use dialect version 2, append `DIALECT 2` to your query command. +Dialect version 2 was introduced in the [2.4](https://github.com/RediSearch/RediSearch/releases/tag/v2.4.3) release to address query parser inconsistencies found in previous versions of Redis. Dialect version 1 remains the default dialect. To use dialect version 2, append `DIALECT 2` to your query command. Support for vector search also was introduced in the 2.4 release and requires `DIALECT 2`. See [here]({{< relref "/develop/interact/search-and-query/query/vector-search" >}}) for more details. `FT.SEARCH ... DIALECT 2` @@ -124,7 +127,7 @@ The Dialect version 2 enhancements also introduce simplified syntax for logical `FT.SEARCH idx "(@tag:{3d3586fe-0416-4572-8ce1} ~@tag{3d3586fe-0416-6758-4ri8})" DIALECT 2` -## `DIALECT 3` +## `DIALECT 3` (Deprecated) Dialect version 3 was introduced in the [2.6](https://github.com/RediSearch/RediSearch/releases/tag/v2.6.3) release. This version introduced support for multi-value indexing and querying of attributes for any attribute type ( [TEXT]({{< relref "develop/interact/search-and-query/indexing/#index-json-arrays-as-text" >}}), [TAG]({{< relref "develop/interact/search-and-query/indexing/#index-json-arrays-as-tag" >}}), [NUMERIC]({{< relref "develop/interact/search-and-query/indexing/#index-json-arrays-as-numeric" >}}), [GEO]({{< relref "develop/interact/search-and-query/indexing/#index-json-arrays-as-geo" >}}) and [VECTOR]({{< relref "develop/interact/search-and-query/indexing/#index-json-arrays-as-vector" >}})) defined by a [JSONPath]({{< relref "/develop/data-types/json/path" >}}) leading to an array or multiple scalar values. Support for [GEOSHAPE]({{< relref "/develop/interact/search-and-query/query/geo-spatial" >}}) queries was also introduced in this dialect. @@ -190,7 +193,7 @@ Now search, with and without `DIALECT 3`. DIALECT 3 is required for shape-based (`POINT` or `POLYGON`) geospatial queries. {{% /alert %}} -## `DIALECT 4` +## `DIALECT 4` (Deprecated) Dialect version 4 was introduced in the [2.8](https://github.com/RediSearch/RediSearch/releases/tag/v2.8.4) release. It introduces performance optimizations for sorting operations on [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) and [`FT.AGGREGATE`]({{< relref "commands/ft.aggregate/" >}}). Apart from specifying `DIALECT 4` at the end of a [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}) command, there are no other syntactic changes. Dialect version 1 remains the default dialect. To use dialect version 4, append `DIALECT 4` to your query command. diff --git a/content/develop/interact/search-and-query/advanced-concepts/escaping.md b/content/develop/interact/search-and-query/advanced-concepts/escaping.md index b750d18fc6..d8d07235a2 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/escaping.md +++ b/content/develop/interact/search-and-query/advanced-concepts/escaping.md @@ -33,7 +33,7 @@ to improve the search even further. See this article about [Tokenization](https://queryunderstanding.com/tokenization-c8cdd6aef7ff) for a general introduction to the concepts. -Redis Stack uses a very simple tokenizer for documents and a slightly more sophisticated tokenizer for queries. Both allow a degree of control over string escaping and tokenization. +Redis uses a very simple tokenizer for documents and a slightly more sophisticated tokenizer for queries. Both allow a degree of control over string escaping and tokenization. The sections below describe the rules for tokenizing text fields and queries. Note that diff --git a/content/develop/interact/search-and-query/advanced-concepts/highlight.md b/content/develop/interact/search-and-query/advanced-concepts/highlight.md index d5bc72ef0c..d257dcda52 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/highlight.md +++ b/content/develop/interact/search-and-query/advanced-concepts/highlight.md @@ -15,7 +15,7 @@ title: Highlighting weight: 7 --- -Redis Stack uses advanced algorithms for highlighting and summarizing, which enable only the relevant portions of a document to appear in response to a search query. This feature allows users to immediately understand the relevance of a document to their search criteria, typically highlighting the matching terms in bold text. +Redis Community Edition uses advanced algorithms for highlighting and summarizing, which enable only the relevant portions of a document to appear in response to a search query. This feature allows users to immediately understand the relevance of a document to their search criteria, typically highlighting the matching terms in bold text. ## Command syntax @@ -36,7 +36,7 @@ FT.SEARCH ... Summarization will fragment the text into smaller sized snippets, each of which containing the found term(s) and some additional surrounding context. -Redis Stack can perform summarization using the `SUMMARIZE` keyword. If no additional arguments are passed, all returned fields are summarized using built-in defaults. +Redis can perform summarization using the `SUMMARIZE` keyword. If no additional arguments are passed, all returned fields are summarized using built-in defaults. The `SUMMARIZE` keyword accepts the following arguments: @@ -65,7 +65,7 @@ FT.SEARCH ... HIGHLIGHT [FIELDS {num} {field}] [TAGS {openTag} {closeTag}] Highlighting will surround the found term (and its variants) with a user-defined pair of tags. This may be used to display the matched text in a different typeface using a markup language, or to otherwise make the text appear differently. -Redis Stack performs highlighting using the `HIGHLIGHT` keyword. If no additional arguments are passed, all returned fields are highlighted using built-in defaults. +Redis performs highlighting using the `HIGHLIGHT` keyword. If no additional arguments are passed, all returned fields are highlighted using built-in defaults. The `HIGHLIGHT` keyword accepts the following arguments: diff --git a/content/develop/interact/search-and-query/advanced-concepts/phonetic_matching.md b/content/develop/interact/search-and-query/advanced-concepts/phonetic_matching.md index b01123a346..7b6c54c0c4 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/phonetic_matching.md +++ b/content/develop/interact/search-and-query/advanced-concepts/phonetic_matching.md @@ -19,10 +19,10 @@ Phonetic matching, for example "Jon" vs. "John", allows searching for terms base Phonetic matching is based on the use of a phonetic algorithm. A phonetic algorithm transforms the input term to an approximate representation of its pronunciation. This allows terms to be indexed and searched by their pronunciation. -As of v1.4, RediSearch provides phonetic matching of text fields specified with the `PHONETIC` attribute. This causes the terms in such fields to be indexed both by their textual value as well as their phonetic approximation. +As of v1.4, Redis Query Engine, which is included in Redis Community Edition, provides phonetic matching of text fields specified with the `PHONETIC` attribute. This causes the terms in such fields to be indexed both by their textual value as well as their phonetic approximation. Performing a search on `PHONETIC` fields will, by default, also return results for phonetically similar terms. This behavior can be controlled with the [`$phonetic` query attribute]({{< relref "/develop/interact/search-and-query/query/#query-attributes" >}}). ## Phonetic algorithms support -Redis Stack currently supports a single phonetic algorithm, the [Double Metaphone](https://en.wikipedia.org/wiki/Metaphone#Double_Metaphone) (DM). It uses the implementation at the [slacy/double-metaphone GitHub site](https://github.com/slacy/double-metaphone), which provides general support for Latin languages. +Redis currently supports a single phonetic algorithm, the [Double Metaphone](https://en.wikipedia.org/wiki/Metaphone#Double_Metaphone) (DM). It uses the implementation at the [slacy/double-metaphone GitHub site](https://github.com/slacy/double-metaphone), which provides general support for Latin languages. diff --git a/content/develop/interact/search-and-query/advanced-concepts/query_syntax.md b/content/develop/interact/search-and-query/advanced-concepts/query_syntax.md index 4c1154966b..b551b8acfc 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/query_syntax.md +++ b/content/develop/interact/search-and-query/advanced-concepts/query_syntax.md @@ -478,4 +478,4 @@ As of v2.6.1, the query attributes syntax supports these additional attributes: The query parser is built using the Lemon Parser Generator and a Ragel based lexer. You can see the `DIALECT 2` grammar definition [at this git repo](https://github.com/RediSearch/RediSearch/blob/master/src/query_parser/v2/parser.y). -You can also see the [DEFAULT_DIALECT]({{< relref "develop/interact/search-and-query/basic-constructs/configuration-parameters#default_dialect" >}}) configuration parameter. +You can also see the [search-default-dialect]({{< relref "/develop/interact/search-and-query/administration/configuration#search-default-dialect" >}}) configuration parameter. diff --git a/content/develop/interact/search-and-query/advanced-concepts/scoring.md b/content/develop/interact/search-and-query/advanced-concepts/scoring.md index aaf687f66c..ba2682272b 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/scoring.md +++ b/content/develop/interact/search-and-query/advanced-concepts/scoring.md @@ -17,11 +17,11 @@ weight: 8 When searching, documents are scored based on their relevance to the query. The score is a floating point number between 0.0 and 1.0, where 1.0 is the highest score. The score is returned as part of the search results and can be used to sort the results. -Redis Stack comes with a few very basic scoring functions to evaluate document relevance. They are all based on document scores and term frequency. This is regardless of the ability to use [sortable fields]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting" >}}). Scoring functions are specified by adding the `SCORER {scorer_name}` argument to a search query. +Redis Community Edition comes with a few very basic scoring functions to evaluate document relevance. They are all based on document scores and term frequency. This is regardless of the ability to use [sortable fields]({{< relref "/develop/interact/search-and-query/advanced-concepts/sorting" >}}). Scoring functions are specified by adding the `SCORER {scorer_name}` argument to a search query. If you prefer a custom scoring function, it is possible to add more functions using the [extension API]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}). -The following is a list of the pre-bundled scoring functions available in Redis Stack and a short explanation about how they work. Each function is mentioned by registered name, which can be passed as a `SCORER` argument in [`FT.SEARCH`]({{< relref "commands/ft.search/" >}}). +The following is a list of the pre-bundled scoring functions available in Redis and a short explanation about how they work. Each function is mentioned by registered name, which can be passed as a `SCORER` argument in [`FT.SEARCH`]({{< relref "/commands/ft.search/" >}}). ## TFIDF (default) diff --git a/content/develop/interact/search-and-query/advanced-concepts/stemming.md b/content/develop/interact/search-and-query/advanced-concepts/stemming.md index 8db542e513..e2fd04d984 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/stemming.md +++ b/content/develop/interact/search-and-query/advanced-concepts/stemming.md @@ -106,7 +106,7 @@ Indexing a Chinese document is different than indexing a document in most other Chinese tokenization is done by scanning the input text and checking every character or sequence of characters against a dictionary of predefined terms and determining the most likely match based on the surrounding terms and characters. -Redis Stack makes use of the [Friso](https://github.com/lionsoul2014/friso) chinese tokenization library for this purpose. This is largely transparent to the user and often no additional configuration is required. +Redis Community Edition makes use of the [Friso](https://github.com/lionsoul2014/friso) chinese tokenization library for this purpose. This is largely transparent to the user and often no additional configuration is required. ## Using custom dictionaries diff --git a/content/develop/interact/search-and-query/advanced-concepts/stopwords.md b/content/develop/interact/search-and-query/advanced-concepts/stopwords.md index f6b56ed328..3b3ec74e78 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/stopwords.md +++ b/content/develop/interact/search-and-query/advanced-concepts/stopwords.md @@ -15,7 +15,7 @@ title: Stop words weight: 1 --- -Redis Stack has a default list of [stop words](https://en.wikipedia.org/wiki/Stop_words). These are words that are usually so common that they do not add much information to search, but take up a lot of space and CPU time in the index. +Redis Community Edition has a default list of [stop words](https://en.wikipedia.org/wiki/Stop_words). These are words that are usually so common that they do not add much information to search, but take up a lot of space and CPU time in the index. When indexing, stop words are discarded and not indexed. When searching, they are also ignored and treated as if they were not sent to the query processor. This is done when parsing the query. diff --git a/content/develop/interact/search-and-query/advanced-concepts/synonyms.md b/content/develop/interact/search-and-query/advanced-concepts/synonyms.md index 5a63808b77..63f1dc0877 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/synonyms.md +++ b/content/develop/interact/search-and-query/advanced-concepts/synonyms.md @@ -9,13 +9,13 @@ categories: - oss - kubernetes - clients -description: Details on synonym support with Redis Stack +description: Details on synonym support with Redis Community Edition linkTitle: Synonym title: Synonym support weight: 11 --- -Redis Stack supports synonyms. That is, searching for synonym words defined by the synonym data structure. +Redis Community Edition supports synonyms. That is, searching for synonym words defined by the synonym data structure. The synonym data structure is a set of groups, each of which contains synonym terms. For example, the following synonym data structure contains three groups, and each group contains three synonym terms: diff --git a/content/develop/interact/search-and-query/basic-constructs/_index.md b/content/develop/interact/search-and-query/basic-constructs/_index.md index 7df41149c5..1ac1aa577c 100644 --- a/content/develop/interact/search-and-query/basic-constructs/_index.md +++ b/content/develop/interact/search-and-query/basic-constructs/_index.md @@ -15,7 +15,7 @@ title: Basic constructs weight: 2 --- -You can use Redis Stack as a powerful search and query engine. It allows you to create indexes and perform efficient queries on structured data, as well as text-based and vector searches on unstructured data. +You can use Redis Community Edition as a powerful search and query engine. It allows you to create indexes and perform efficient queries on structured data, as well as text-based and vector searches on unstructured data. This section introduces the basic constructs of querying and searching, and explains how to use them to build powerful search capabilities into your applications. @@ -31,7 +31,7 @@ Not all documents need to have the same fields. You can include or exclude field ## Indexing fields -Not all fields are relevant to perform search operations, and indexing all fields may lead to unnecessary overhead. That's why you have the flexibility to choose which fields should be indexed for efficient search operations. By indexing a field, you enable Redis Stack to create an index structure that optimizes search performance on that field. +Not all fields are relevant to perform search operations, and indexing all fields may lead to unnecessary overhead. That's why you have the flexibility to choose which fields should be indexed for efficient search operations. By indexing a field, you enable Redis to create an index structure that optimizes search performance on that field. Fields that are not indexed will not contribute to search results. However, they can still be retrieved as part of the document data when fetching search results. diff --git a/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md b/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md index 8cb709f5e7..6b11b98558 100644 --- a/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md +++ b/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md @@ -9,7 +9,7 @@ categories: - oss - kubernetes - clients -description: 'Querying and searching in Redis Stack can be tuned through multiple +description: 'Querying and searching in Redis Community Edition can be tuned through multiple configuration parameters. Some of these parameters can only be set at load-time, while other parameters can be set either at load-time or at run-time. diff --git a/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md b/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md index 5ea8ea75bf..3f1912a200 100644 --- a/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md +++ b/content/develop/interact/search-and-query/basic-constructs/field-and-type-options.md @@ -16,7 +16,7 @@ weight: 2 --- -Redis Stack provides various field types that allow you to store and search different kinds of data in your indexes. This page explains the available field types, their characteristics, and how they can be used effectively. +Redis Community Edition provides various field types that allow you to store and search different kinds of data in your indexes. This page explains the available field types, their characteristics, and how they can be used effectively. ## Numeric fields @@ -140,7 +140,7 @@ for more information and code examples. ## Vector fields -Vector fields are floating-point vectors that are typically generated by external machine learning models. These vectors represent unstructured data such as text, images, or other complex features. Redis Stack allows you to search for similar vectors using vector search algorithms like cosine similarity, Euclidean distance, and inner product. This enables you to build advanced search applications, recommendation systems, or content similarity analysis. +Vector fields are floating-point vectors that are typically generated by external machine learning models. These vectors represent unstructured data such as text, images, or other complex features. Redis allows you to search for similar vectors using vector search algorithms like cosine similarity, Euclidean distance, and inner product. This enables you to build advanced search applications, recommendation systems, or content similarity analysis. You can add vector fields to the schema in [`FT.CREATE`]({{< relref "commands/ft.create/" >}}) using this syntax: @@ -198,7 +198,7 @@ For more information about tag fields, see [Tag Fields]({{< relref "/develop/int ## Text fields -Text fields are specifically designed for storing human language text. When indexing text fields, Redis Stack performs several transformations to optimize search capabilities. The text is transformed to lowercase, allowing case-insensitive searches. The data is tokenized, meaning it is split into individual words or tokens, which enables efficient full-text search functionality. Text fields can be weighted to assign different levels of importance to specific fields during search operations. Additionally, text fields can be sorted based on their values, enabling the sorting of search results by relevance or other criteria. +Text fields are specifically designed for storing human language text. When indexing text fields, Redis performs several transformations to optimize search capabilities. The text is transformed to lowercase, allowing case-insensitive searches. The data is tokenized, meaning it is split into individual words or tokens, which enables efficient full-text search functionality. Text fields can be weighted to assign different levels of importance to specific fields during search operations. Additionally, text fields can be sorted based on their values, enabling the sorting of search results by relevance or other criteria. Text fields can be added to the schema with the following syntax: diff --git a/content/develop/interact/search-and-query/deprecated/payloads.md b/content/develop/interact/search-and-query/deprecated/payloads.md index 72fe283229..f3904927d9 100644 --- a/content/develop/interact/search-and-query/deprecated/payloads.md +++ b/content/develop/interact/search-and-query/deprecated/payloads.md @@ -19,7 +19,7 @@ weight: 12 The payload feature is deprecated in 2.0 {{% /alert %}} -Usually, Redis Stack stores documents as hashes or JSON. But if you want to access some data for aggregation or scoring functions, Redis can store that data as an inline payload. This will allow us to evaluate the properties of a document for scoring purposes at a very low cost. +Usually, Redis Community Edition stores documents as hashes or JSON. But if you want to access some data for aggregation or scoring functions, Redis can store that data as an inline payload. This will allow us to evaluate the properties of a document for scoring purposes at a very low cost. Since the scoring functions already have access to the DocumentMetaData, which contains document flags and score, Redis can add custom payloads that can be evaluated in run-time. diff --git a/content/develop/interact/search-and-query/indexing/_index.md b/content/develop/interact/search-and-query/indexing/_index.md index e85d2cb95c..2663b58b2d 100644 --- a/content/develop/interact/search-and-query/indexing/_index.md +++ b/content/develop/interact/search-and-query/indexing/_index.md @@ -15,16 +15,7 @@ title: Indexing weight: 3 --- -In addition to indexing Redis hashes, Redis Stack can also index JSON documents. - -## Prerequisites - -Before you can index and search JSON documents, you need a database with either: - -- [Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}), which automatically includes JSON and searching and querying features -- Redis v6.x or later with the following modules installed and enabled: - - RediSearch v2.2 or later - - RedisJSON v2.0 or later +In addition to indexing Redis hashes, Redis Community Edition can also index JSON documents. ## Create index with JSON schema @@ -54,7 +45,7 @@ See [Index limitations](#index-limitations) for more details about JSON index `S ## Add JSON documents -After you create an index, Redis Stack automatically indexes any existing, modified, or newly created JSON documents stored in the database. For existing documents, indexing runs asynchronously in the background, so it can take some time before the document is available. Modified and newly created documents are indexed synchronously, so the document will be available by the time the add or modify command finishes. +After you create an index, Redis automatically indexes any existing, modified, or newly created JSON documents stored in the database. For existing documents, indexing runs asynchronously in the background, so it can take some time before the document is available. Modified and newly created documents are indexed synchronously, so the document will be available by the time the add or modify command finishes. You can use any JSON write command, such as [`JSON.SET`]({{< relref "commands/json.set/" >}}) and [`JSON.ARRAPPEND`]({{< relref "commands/json.arrappend/" >}}), to create or modify JSON documents. diff --git a/content/develop/interact/search-and-query/query-use-cases/_index.md b/content/develop/interact/search-and-query/query-use-cases/_index.md index fcbdc0b584..8b6c36c20e 100644 --- a/content/develop/interact/search-and-query/query-use-cases/_index.md +++ b/content/develop/interact/search-and-query/query-use-cases/_index.md @@ -17,11 +17,11 @@ weight: 5 **Application search and external secondary index** -Redis Stack supports application search, whether the source of record is Redis or another database. In the latter case, you can use Redis Stack as an external secondary index for numeric or full-text data. +Redis Community Edition supports application search, whether the source of record is Redis or another database. In the latter case, you can use Redis as an external secondary index for numeric or full-text data. **Secondary index for Redis data** -You can represent your data model using Redis hashes and JSON documents. You can then declare secondary indexes to support various queries on your data set. Redis Stack updates indexes automatically whenever a hash or JSON document that matches the indexes is added or updated. +You can represent your data model using Redis hashes and JSON documents. You can then declare secondary indexes to support various queries on your data set. Redis updates indexes automatically whenever a hash or JSON document that matches the indexes is added or updated. **Geo-distributed search** @@ -29,15 +29,15 @@ In geo-distributed search, hashes and JSON documents are handled in the usual [a **Unified search** -You can use Redis Stack to search across several source systems, like file servers, content management systems (CMS), or customer relationship management (CRM) systems. You can process source data in batches using, for example, ETL tools, or as live streams (e.g., Kafka or Redis streams). +You can use Redis to search across several source systems, like file servers, content management systems (CMS), or customer relationship management (CRM) systems. You can process source data in batches using, for example, ETL tools, or as live streams (for example, Kafka or Redis streams). **Analytics** -Data often originates from several source systems. Redis Stack can provide a unified view of dimensions and facts. You can query data based on dimensions, group by dimension, and apply aggregations to facts. +Data often originates from several source systems. Redis can provide a unified view of dimensions and facts. You can query data based on dimensions, group by dimension, and apply aggregations to facts. -{{% alert title="Redis Stack for faceted search" color="warning" %}} +{{% alert title="Redis for faceted search" color="warning" %}} -Facets are multiple explicit dimensions implemented as tags in RediSearch. You can query data based on facets using aggregations (`COUNT`, `TOLIST`, `FIRST_VALUE`, and `RANDOM_SAMPLE`). +Facets are multiple explicit dimensions implemented as tags in the Redis Query Engine. You can query data based on facets using aggregations (`COUNT`, `TOLIST`, `FIRST_VALUE`, and `RANDOM_SAMPLE`). {{% /alert %}} @@ -47,7 +47,7 @@ When the user logs on to the site, the purchase-search history is populated into The application/service creates a temporary and user-specific, full-text index when a user logs in. The application/service has direct access to the user-specific index and the primary datastore. When the user logs out of the service, the index is explicitly removed. Otherwise, the index expires after a while (for example, after the user's session expires). -Using Redis Stack for this type of application provides these benefits: +Using Redis for this type of application provides these benefits: - Search index is only populated when needed. - Only a small portion (for example, 2%) of users are active at the same time. @@ -56,11 +56,11 @@ Using Redis Stack for this type of application provides these benefits: **Real-time inventory (retail)** -In real-time inventory retail, the key question is product availability: "What is available where?" The challenges with such projects are performance and accuracy. Redis Stack allows for real-time searching and aggregations over millions of store/SKU combinations. +In real-time inventory retail, the key question is product availability: "What is available where?" The challenges with such projects are performance and accuracy. Redis allows for real-time searching and aggregations over millions of store/SKU combinations. -You can establish real-time event capture from a legacy inventory system to Redis Stack and then have several inventory services query it. Then, you can use combined queries such as item counts, price ranges, categories, and locations. Take advantage of geo-distributed search (Active-Active) for your remote store locations. +You can establish real-time event capture from a legacy inventory system to Redis and then have several inventory services query it. Then, you can use combined queries such as item counts, price ranges, categories, and locations. Take advantage of geo-distributed search (Active-Active) for your remote store locations. -Using Redis Stack for this type of application provides these benefits: +Using Redis for this type of application provides these benefits: - Low-latency queries for downstream consumers like marketing, stores/e-commerce, and fulfillment - Immediate and higher consistency between stores and data-centers @@ -75,7 +75,7 @@ Collect, access, store, and utilize communication data in real time. Capture net Gather data using connection information gathering (source IPs, DNS) and conversation data gathering (Wireshark/TShark live capture). Then filter, transform, and store the conversation data in Redis to perform search queries and create custom dashboards for your analyses. -Using Redis Stack for this type of application provides these benefits: +Using Redis for this type of application provides these benefits: - Insights into performance issues, security threats, and network faults - Improved service uptime and security @@ -86,7 +86,7 @@ Research portals let users search for articles, research, specifications, past s To build such a system, you can use indexes supporting tag queries, numeric range queries, geo-location queries, and full-text search. -Using Redis Stack for this type of application provides these benefits: +Using Redis for this type of application provides these benefits: - Create relevant, personalized search experiences while enforcing internal and regulatory data governance policies - Increased productivity, security, and compliance \ No newline at end of file diff --git a/content/develop/interact/search-and-query/query/_index.md b/content/develop/interact/search-and-query/query/_index.md index 294338b488..c05c1d1f57 100644 --- a/content/develop/interact/search-and-query/query/_index.md +++ b/content/develop/interact/search-and-query/query/_index.md @@ -16,7 +16,7 @@ title: Query data weight: 5 --- -Redis Stack distinguishes between the [FT.SEARCH]({{< relref "commands/ft.search" >}}) and [FT.AGGREGATE]({{< relref "commands/ft.aggregate" >}}) query commands. You should use [FT.SEARCH]({{< relref "commands/ft.search" >}}) if you want to perform selections and projections only. If you also need to apply mapping functions, group, or aggregate data, use the [FT.AGGREGATE]({{< relref "commands/ft.aggregate" >}}) command. +Redis Community Edition distinguishes between the [FT.SEARCH]({{< relref "/commands/ft.search" >}}) and [FT.AGGREGATE]({{< relref "/commands/ft.aggregate" >}}) query commands. You should use [FT.SEARCH]({{< relref "/commands/ft.search" >}}) if you want to perform selections and projections only. If you also need to apply mapping functions, group, or aggregate data, use the [FT.AGGREGATE]({{< relref "/commands/ft.aggregate" >}}) command. * **Selection**: A selection allows you to return all documents that fulfill specific criteria. * **Projection**: Projections are used to return specific fields of the result set. You can also map/project to calculated field values. @@ -24,7 +24,7 @@ Redis Stack distinguishes between the [FT.SEARCH]({{< relref "commands/ft.search Here is a short SQL comparison using the [bicycle dataset](./data/bicycles.txt): -|Type| SQL | Redis Stack | +|Type| SQL | Redis | |----------| --- | ----------- | | Selection | `SELECT * FROM bicycles WHERE price >= 1000` | `FT.SEARCH idx:bicycle "@price:[1000 +inf]"` | | Simple projection | `SELECT id, price FROM bicycles` | `FT.SEARCH idx:bicycle "*" RETURN 2 __key, price` | diff --git a/content/develop/interact/search-and-query/query/combined.md b/content/develop/interact/search-and-query/query/combined.md index 706f34c380..3ab76e8886 100644 --- a/content/develop/interact/search-and-query/query/combined.md +++ b/content/develop/interact/search-and-query/query/combined.md @@ -26,7 +26,7 @@ A combined query is a combination of several query types, such as: You can use logical query operators to combine query expressions for numeric, tag, and text fields. For vector fields, you can combine a KNN query with a pre-filter. {{% alert title="Note" color="warning" %}} -The operators are interpreted slightly differently depending on the query dialect used. The default dialect is `DIALECT 1`; see [this article]({{< relref "develop/interact/search-and-query/basic-constructs/configuration-parameters#default_dialect" >}}) for information on how to change the dialect version. This article uses the second version of the query dialect, `DIALECT 2`, and uses additional brackets (`(...)`) to help clarify the examples. Further details can be found in the [query syntax documentation]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}}). +The operators are interpreted slightly differently depending on the query dialect used. The default dialect is `DIALECT 1`; see [this article]({{< relref "/develop/interact/search-and-query/administration/configuration#search-default-dialect" >}}) for information on how to change the dialect version. This article uses the second version of the query dialect, `DIALECT 2`, and uses additional brackets (`(...)`) to help clarify the examples. Further details can be found in the [query syntax documentation]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}}). {{% /alert %}} The examples in this article use the following schema: diff --git a/content/develop/interact/search-and-query/query/geo-spatial.md b/content/develop/interact/search-and-query/query/geo-spatial.md index fe9bbfe962..d1473bbe8e 100644 --- a/content/develop/interact/search-and-query/query/geo-spatial.md +++ b/content/develop/interact/search-and-query/query/geo-spatial.md @@ -15,7 +15,7 @@ title: Geospatial queries weight: 4 --- -Redis Stack's geospatial feature allows you to query for data associated with geographic locations. You can either query for locations within a specific radius or based on geometric shapes, such as polygons. A polygon shape could, for instance, represent a lake or the layout of a building. +The geospatial feature in Redis Community Edition allows you to query for data associated with geographic locations. You can either query for locations within a specific radius or based on geometric shapes, such as polygons. A polygon shape could, for instance, represent a lake or the layout of a building. The examples in this article use the following schema: @@ -26,7 +26,7 @@ The examples in this article use the following schema: {{% alert title="Note" color="warning" %}} -Redis Stack version 7.2.0 or higher is required to use the `GEOSHAPE` field type. +Redis version 7.2.0 or higher is required to use the `GEOSHAPE` field type. {{% /alert %}} ## Radius diff --git a/content/develop/interact/search-and-query/query/vector-search.md b/content/develop/interact/search-and-query/query/vector-search.md index aebe25c640..4178cd8c88 100644 --- a/content/develop/interact/search-and-query/query/vector-search.md +++ b/content/develop/interact/search-and-query/query/vector-search.md @@ -15,7 +15,7 @@ title: Vector search weight: 5 --- -This article gives you a good overview of how to perform vector search queries with Redis Stack. See the [Redis as a vector database quick start guide]({{< relref "/develop/get-started/vector-database" >}}) for more information about Redis as a vector database. You can also find more detailed information about all the parameters in the [vector reference documentation]({{< relref "/develop/interact/search-and-query/advanced-concepts/vectors" >}}). +This article gives you a good overview of how to perform vector search queries with the Redis Query Engine, which is part of Redis Community Edition. See the [Redis as a vector database quick start guide]({{< relref "/develop/get-started/vector-database" >}}) for more information about Redis as a vector database. You can also find more detailed information about all the parameters in the [vector reference documentation]({{< relref "/develop/interact/search-and-query/advanced-concepts/vectors" >}}). A vector search query on a vector field allows you to find all vectors in a vector space that are close to a given vector. You can query for the k-nearest neighbors or vectors within a given radius. diff --git a/content/develop/reference/modules/modules-api-ref.md b/content/develop/reference/modules/modules-api-ref.md index 6e233e3979..0bd64c3083 100644 --- a/content/develop/reference/modules/modules-api-ref.md +++ b/content/develop/reference/modules/modules-api-ref.md @@ -189,7 +189,7 @@ The function returns NULL if `bytes` is 0. These functions are used to implement custom Redis commands. -For examples, see [https://redis.io/topics/modules-intro](https://redis.io/topics/modules-intro). +For examples, see [https://redis.io/docs/latest/develop/reference/modules/](https://redis.io/docs/latest/develop/reference/modules/). @@ -348,7 +348,7 @@ example "write deny-oom". The set of flags are: from the same input arguments and key values. Starting from Redis 7.0 this flag has been deprecated. Declaring a command as "random" can be done using - command tips, see https://redis.io/topics/command-tips. + command tips, see https://redis.io/docs/latest/develop/reference/command-tips/. * **"allow-stale"**: The command is allowed to run on slaves that don't serve stale data. Don't use if you don't know what this means. @@ -380,6 +380,9 @@ example "write deny-oom". The set of flags are: RedisModule_Yield. * **"getchannels-api"**: The command implements the interface to return the arguments that are channels. +* **"internal"**: Internal command, one that should not be exposed to the user connections. + For example, module commands that are called by the modules, + commands that do not perform ACL validations (relying on earlier checks) The last three parameters specify which arguments of the new command are Redis keys. See [https://redis.io/commands/command](https://redis.io/commands/command) for more information. @@ -558,7 +561,7 @@ All fields except `version` are optional. Explanation of the fields: both strings set to NULL. - `tips`: A string of space-separated tips regarding this command, meant for - clients and proxies. See [https://redis.io/topics/command-tips](https://redis.io/topics/command-tips). + clients and proxies. See [https://redis.io/docs/latest/develop/reference/command-tips/](https://redis.io/docs/latest/develop/reference/command-tips/). - `arity`: Number of arguments, including the command name itself. A positive number specifies an exact number of arguments and a negative number @@ -2200,6 +2203,9 @@ Available flags and their meaning: * `REDISMODULE_CTX_FLAGS_SERVER_STARTUP`: The Redis instance is starting + * `REDISMODULE_CTX_FLAGS_DEBUG_ENABLED`: Debug commands are enabled for this + context. + ### `RedisModule_AvoidReplicaTraffic` @@ -2292,6 +2298,7 @@ Extra flags that can be pass to the API under the mode argument: * `REDISMODULE_OPEN_KEY_NOSTATS` - Don't update keyspace hits/misses counters. * `REDISMODULE_OPEN_KEY_NOEXPIRE` - Avoid deleting lazy expired keys. * `REDISMODULE_OPEN_KEY_NOEFFECTS` - Avoid any effects from fetching the key. +* `REDISMODULE_OPEN_KEY_ACCESS_EXPIRED` - Access expired keys that have not yet been deleted @@ -3125,6 +3132,11 @@ expecting a `RedisModuleString` pointer to pointer, the function just reports if the field exists or not and expects an integer pointer as the second element of each pair. +`REDISMODULE_HASH_EXPIRE_TIME`: retrieves the expiration time of a field in the hash. +The function expects a `mstime_t` pointer as the second element of each pair. +If the field does not exist or has no expiration, the value is set to +`REDISMODULE_NO_EXPIRE`. This flag must not be used with `REDISMODULE_HASH_EXISTS`. + Example of `REDISMODULE_HASH_CFIELDS`: RedisModuleString *username, *hashedpass; @@ -3133,8 +3145,13 @@ Example of `REDISMODULE_HASH_CFIELDS`: Example of `REDISMODULE_HASH_EXISTS`: int exists; - RedisModule_HashGet(mykey,REDISMODULE_HASH_EXISTS,argv[1],&exists,NULL); + RedisModule_HashGet(mykey,REDISMODULE_HASH_EXISTS,"username",&exists,NULL); + +Example of `REDISMODULE_HASH_EXPIRE_TIME`: + mstime_t hpExpireTime; + RedisModule_HashGet(mykey,REDISMODULE_HASH_EXPIRE_TIME,"hp",&hpExpireTime,NULL); + The function returns `REDISMODULE_OK` on success and `REDISMODULE_ERR` if the key is not a hash value. @@ -3143,11 +3160,28 @@ Memory management: The returned `RedisModuleString` objects should be released with [`RedisModule_FreeString()`](#RedisModule_FreeString), or by enabling automatic memory management. + + +### `RedisModule_HashFieldMinExpire` + + mstime_t RedisModule_HashFieldMinExpire(RedisModuleKey *key); + +**Available since:** unreleased + + +Retrieves the minimum expiration time of fields in a hash. + +Return: + - The minimum expiration time (in milliseconds) of the hash fields if at + least one field has an expiration set. + - `REDISMODULE_NO_EXPIRE` if no fields have an expiration set or if the key + is not a hash. + ## Key API for Stream type -For an introduction to streams, see [https://redis.io/topics/streams-intro](https://redis.io/topics/streams-intro). +For an introduction to streams, see [https://redis.io/docs/latest/develop/data-types/streams/](https://redis.io/docs/latest/develop/data-types/streams/). The type `RedisModuleStreamID`, which is used in stream functions, is a struct with two 64-bit fields and is defined as @@ -3734,6 +3768,8 @@ Exported API to call any Redis command from modules. dependent activity, such as ACL checks within scripts will proceed as expected. Otherwise, the command will run as the Redis unrestricted user. + Upon sending a command from an internal connection, this flag is + ignored and the command will run as the Redis unrestricted user. * `S` -- Run the command in a script mode, this means that it will raise an error if a command which are not allowed inside a script (flagged with the `deny-script` flag) is invoked (like SHUTDOWN). @@ -3803,7 +3839,7 @@ Example code fragment: // Do something with myval. } -This API is documented here: [https://redis.io/topics/modules-intro](https://redis.io/topics/modules-intro) +This API is documented here: [https://redis.io/docs/latest/develop/reference/modules/](https://redis.io/docs/latest/develop/reference/modules/) @@ -5043,7 +5079,7 @@ that the notification code will be executed in the middle on Redis logic runs is dangerous and discouraged. In order to react to key space events with write actions, please refer to [`RedisModule_AddPostNotificationJob`](#RedisModule_AddPostNotificationJob). -See [https://redis.io/topics/notifications](https://redis.io/topics/notifications) for more information. +See [https://redis.io/docs/latest/develop/use/keyspace-notifications/](https://redis.io/docs/latest/develop/use/keyspace-notifications/) for more information. @@ -5606,6 +5642,31 @@ If the user is able to access the key then `REDISMODULE_OK` is returned, otherwi * EINVAL: The provided flags are invalid. * EACCESS: The user does not have permission to access the key. + + +### `RedisModule_ACLCheckKeyPrefixPermissions` + + int RedisModule_ACLCheckKeyPrefixPermissions(RedisModuleUser *user, + RedisModuleString *prefix, + int flags); + +**Available since:** unreleased + +Check if the user can access keys matching the given key prefix according to the ACLs +attached to the user and the flags representing key access. The flags are the same that +are used in the keyspec for logical operations. These flags are documented in +[`RedisModule_SetCommandInfo`](#RedisModule_SetCommandInfo) as the `REDISMODULE_CMD_KEY_ACCESS`, +`REDISMODULE_CMD_KEY_UPDATE`, `REDISMODULE_CMD_KEY_INSERT`, and `REDISMODULE_CMD_KEY_DELETE` flags. + +If no flags are supplied, the user is still required to have some access to keys matching +the prefix for this command to return successfully. + +If the user is able to access keys matching the prefix, then `REDISMODULE_OK` is returned. +Otherwise, `REDISMODULE_ERR` is returned and errno is set to one of the following values: + +* EINVAL: The provided flags are invalid. +* EACCES: The user does not have permission to access keys matching the prefix. + ### `RedisModule_ACLCheckChannelPermissions` @@ -6775,7 +6836,7 @@ Callback for scan implementation. The way it should be used: RedisModuleScanCursor *c = RedisModule_ScanCursorCreate(); - RedisModuleKey *key = RedisModule_OpenKey(...) + RedisModuleKey *key = RedisModule_OpenKey(...); while(RedisModule_ScanKey(key, c, callback, privateData)); RedisModule_CloseKey(key); RedisModule_ScanCursorDestroy(c); @@ -6785,13 +6846,13 @@ the actual call to [`RedisModule_ScanKey`](#RedisModule_ScanKey), and re-opening RedisModuleScanCursor *c = RedisModule_ScanCursorCreate(); RedisModule_ThreadSafeContextLock(ctx); - RedisModuleKey *key = RedisModule_OpenKey(...) + RedisModuleKey *key = RedisModule_OpenKey(...); while(RedisModule_ScanKey(ctx, c, callback, privateData)){ RedisModule_CloseKey(key); RedisModule_ThreadSafeContextUnlock(ctx); // do some background job RedisModule_ThreadSafeContextLock(ctx); - RedisModuleKey *key = RedisModule_OpenKey(...) + key = RedisModule_OpenKey(...); } RedisModule_CloseKey(key); RedisModule_ScanCursorDestroy(c); @@ -7368,6 +7429,24 @@ Create an integer config that server clients can interact with via the `CONFIG SET`, `CONFIG GET`, and `CONFIG REWRITE` commands. See [`RedisModule_RegisterStringConfig`](#RedisModule_RegisterStringConfig) for detailed information about configs. + + +### `RedisModule_LoadDefaultConfigs` + + int RedisModule_LoadDefaultConfigs(RedisModuleCtx *ctx); + +**Available since:** unreleased + +Applies all default configurations for the parameters the module registered. +Only call this function if the module would like to make changes to the +configuration values before the actual values are applied by [`RedisModule_LoadConfigs`](#RedisModule_LoadConfigs). +Otherwise it's sufficient to call [`RedisModule_LoadConfigs`](#RedisModule_LoadConfigs), it should already set the default values if needed. +This makes it possible to distinguish between default values and user provided values and apply other changes between setting the defaults and the user values. +This will return `REDISMODULE_ERR` if it is called: +1. outside `RedisModule_OnLoad` +2. more than once +3. after the [`RedisModule_LoadConfigs`](#RedisModule_LoadConfigs) call + ### `RedisModule_LoadConfigs` @@ -7457,6 +7536,18 @@ Example: RedisModule_RdbSave(ctx, s, 0); RedisModule_RdbStreamFree(s); + + +### `RedisModule_GetInternalSecret` + + const char* RedisModule_GetInternalSecret(RedisModuleCtx *ctx, size_t *len); + +**Available since:** unreleased + +Returns the internal secret of the cluster. +Should be used to authenticate as an internal connection to a node in the +cluster, and by that gain the permissions to execute internal commands. + ## Key eviction API @@ -7703,6 +7794,36 @@ Return the name of the command currently running Register a defrag callback for global data, i.e. anything that the module may allocate that is not tied to a specific data type. + + +### `RedisModule_RegisterDefragFunc2` + + int RedisModule_RegisterDefragFunc2(RedisModuleCtx *ctx, + RedisModuleDefragFunc2 cb); + +**Available since:** unreleased + +Register a defrag callback for global data, i.e. anything that the module +may allocate that is not tied to a specific data type. +This is a more advanced version of [`RedisModule_RegisterDefragFunc`](#RedisModule_RegisterDefragFunc), in that it takes +a callbacks that has a return value, and can use [`RedisModule_DefragShouldStop`](#RedisModule_DefragShouldStop) +in and indicate that it should be called again later, or is it done (returned 0). + + + +### `RedisModule_RegisterDefragCallbacks` + + int RedisModule_RegisterDefragCallbacks(RedisModuleCtx *ctx, + RedisModuleDefragFunc start, + RedisModuleDefragFunc end); + +**Available since:** unreleased + +Register a defrag callbacks that will be called when defrag operation starts and ends. + +The callbacks are the same as [`RedisModule_RegisterDefragFunc`](#RedisModule_RegisterDefragFunc) but the user +can also assume the callbacks are called when the defrag operation starts and ends. + ### `RedisModule_DefragShouldStop` @@ -7722,9 +7843,6 @@ position so it can later use [`RedisModule_DefragCursorGet()`](#RedisModule_Defr When stopped and more work is left to be done, the callback should return 1. Otherwise, it should return 0. -NOTE: Modules should consider the frequency in which this function is called, -so it generally makes sense to do small batches of work in between calls. - ### `RedisModule_DefragCursorSet` @@ -7790,6 +7908,38 @@ If a non-NULL value is returned, the caller should use the new pointer instead of the old one and update any reference to the old pointer, which must not be used again. + + +### `RedisModule_DefragAllocRaw` + + void *RedisModule_DefragAllocRaw(RedisModuleDefragCtx *ctx, size_t size); + +**Available since:** unreleased + +Allocate memory for defrag purposes + +On the common cases user simply want to reallocate a pointer with a single +owner. For such usecase [`RedisModule_DefragAlloc`](#RedisModule_DefragAlloc) is enough. But on some usecases the user +might want to replace a pointer with multiple owners in different keys. +In such case, an in place replacement can not work because the other key still +keep a pointer to the old value. + +[`RedisModule_DefragAllocRaw`](#RedisModule_DefragAllocRaw) and [`RedisModule_DefragFreeRaw`](#RedisModule_DefragFreeRaw) allows to control when the memory +for defrag purposes will be allocated and when it will be freed, +allow to support more complex defrag usecases. + + + +### `RedisModule_DefragFreeRaw` + + void RedisModule_DefragFreeRaw(RedisModuleDefragCtx *ctx, void *ptr); + +**Available since:** unreleased + +Free memory for defrag purposes + +See [`RedisModule_DefragAllocRaw`](#RedisModule_DefragAllocRaw) for more information. + ### `RedisModule_DefragRedisModuleString` @@ -7809,6 +7959,30 @@ may not be defragmentable. One exception is command argvs which, if retained by the module, will end up with a single reference (because the reference on the Redis side is dropped as soon as the command callback returns). + + +### `RedisModule_DefragRedisModuleDict` + + RedisModuleDict *RedisModule_DefragRedisModuleDict(RedisModuleDefragCtx *ctx, + RedisModuleDict *dict, + RedisModuleDefragDictValueCallback valueCB, + RedisModuleString **seekTo); + +**Available since:** unreleased + +Defragment a Redis Module Dictionary by scanning its contents and calling a value +callback for each value. + +The callback gets the current value in the dict, and should update newptr to the new pointer, +if the value was re-allocated to a different address. The callback also gets the key name just as a reference. +The callback returns 0 when defrag is complete for this node, 1 when node needs more work. + +The API can work incrementally by accepting a seek position to continue from, and +returning the next position to seek to on the next call (or return NULL when the iteration is completed). + +This API returns a new dict if it was re-allocated to a new address (will only +be attempted when *seekTo is NULL on entry). + ### `RedisModule_GetKeyNameFromDefragCtx` @@ -7840,6 +8014,7 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_ACLCheckChannelPermissions`](#RedisModule_ACLCheckChannelPermissions) * [`RedisModule_ACLCheckCommandPermissions`](#RedisModule_ACLCheckCommandPermissions) * [`RedisModule_ACLCheckKeyPermissions`](#RedisModule_ACLCheckKeyPermissions) +* [`RedisModule_ACLCheckKeyPrefixPermissions`](#RedisModule_ACLCheckKeyPrefixPermissions) * [`RedisModule_AbortBlock`](#RedisModule_AbortBlock) * [`RedisModule_AddACLCategory`](#RedisModule_AddACLCategory) * [`RedisModule_AddPostNotificationJob`](#RedisModule_AddPostNotificationJob) @@ -7904,8 +8079,11 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_DbSize`](#RedisModule_DbSize) * [`RedisModule_DeauthenticateAndCloseClient`](#RedisModule_DeauthenticateAndCloseClient) * [`RedisModule_DefragAlloc`](#RedisModule_DefragAlloc) +* [`RedisModule_DefragAllocRaw`](#RedisModule_DefragAllocRaw) * [`RedisModule_DefragCursorGet`](#RedisModule_DefragCursorGet) * [`RedisModule_DefragCursorSet`](#RedisModule_DefragCursorSet) +* [`RedisModule_DefragFreeRaw`](#RedisModule_DefragFreeRaw) +* [`RedisModule_DefragRedisModuleDict`](#RedisModule_DefragRedisModuleDict) * [`RedisModule_DefragRedisModuleString`](#RedisModule_DefragRedisModuleString) * [`RedisModule_DefragShouldStop`](#RedisModule_DefragShouldStop) * [`RedisModule_DeleteKey`](#RedisModule_DeleteKey) @@ -7973,6 +8151,7 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_GetDbIdFromOptCtx`](#RedisModule_GetDbIdFromOptCtx) * [`RedisModule_GetDetachedThreadSafeContext`](#RedisModule_GetDetachedThreadSafeContext) * [`RedisModule_GetExpire`](#RedisModule_GetExpire) +* [`RedisModule_GetInternalSecret`](#RedisModule_GetInternalSecret) * [`RedisModule_GetKeyNameFromDefragCtx`](#RedisModule_GetKeyNameFromDefragCtx) * [`RedisModule_GetKeyNameFromDigest`](#RedisModule_GetKeyNameFromDigest) * [`RedisModule_GetKeyNameFromIO`](#RedisModule_GetKeyNameFromIO) @@ -7999,6 +8178,7 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_GetToKeyNameFromOptCtx`](#RedisModule_GetToKeyNameFromOptCtx) * [`RedisModule_GetTypeMethodVersion`](#RedisModule_GetTypeMethodVersion) * [`RedisModule_GetUsedMemoryRatio`](#RedisModule_GetUsedMemoryRatio) +* [`RedisModule_HashFieldMinExpire`](#RedisModule_HashFieldMinExpire) * [`RedisModule_HashGet`](#RedisModule_HashGet) * [`RedisModule_HashSet`](#RedisModule_HashSet) * [`RedisModule_HoldString`](#RedisModule_HoldString) @@ -8032,6 +8212,7 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_LoadConfigs`](#RedisModule_LoadConfigs) * [`RedisModule_LoadDataTypeFromString`](#RedisModule_LoadDataTypeFromString) * [`RedisModule_LoadDataTypeFromStringEncver`](#RedisModule_LoadDataTypeFromStringEncver) +* [`RedisModule_LoadDefaultConfigs`](#RedisModule_LoadDefaultConfigs) * [`RedisModule_LoadDouble`](#RedisModule_LoadDouble) * [`RedisModule_LoadFloat`](#RedisModule_LoadFloat) * [`RedisModule_LoadLongDouble`](#RedisModule_LoadLongDouble) @@ -8068,7 +8249,9 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_RegisterBoolConfig`](#RedisModule_RegisterBoolConfig) * [`RedisModule_RegisterClusterMessageReceiver`](#RedisModule_RegisterClusterMessageReceiver) * [`RedisModule_RegisterCommandFilter`](#RedisModule_RegisterCommandFilter) +* [`RedisModule_RegisterDefragCallbacks`](#RedisModule_RegisterDefragCallbacks) * [`RedisModule_RegisterDefragFunc`](#RedisModule_RegisterDefragFunc) +* [`RedisModule_RegisterDefragFunc2`](#RedisModule_RegisterDefragFunc2) * [`RedisModule_RegisterEnumConfig`](#RedisModule_RegisterEnumConfig) * [`RedisModule_RegisterInfoFunc`](#RedisModule_RegisterInfoFunc) * [`RedisModule_RegisterNumericConfig`](#RedisModule_RegisterNumericConfig) @@ -8190,3 +8373,4 @@ There is no guarantee that this info is always available, so this may return -1. * [`RedisModule_ZsetRem`](#RedisModule_ZsetRem) * [`RedisModule_ZsetScore`](#RedisModule_ZsetScore) * [`RedisModule__Assert`](#RedisModule__Assert) + diff --git a/content/develop/tools/insight/_index.md b/content/develop/tools/insight/_index.md index 35f4c1c61d..14cc1a16e2 100644 --- a/content/develop/tools/insight/_index.md +++ b/content/develop/tools/insight/_index.md @@ -21,7 +21,7 @@ weight: 1 [![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/QUkjSsk) [![Github](https://img.shields.io/static/v1?label=&message=repository&color=5961FF&logo=github)](https://github.com/redisinsight/redisinsight/) -Redis Insight is a powerful tool for visualizing and optimizing data in Redis or Redis Stack, making real-time application development easier and more fun than ever before. Redis Insight lets you do both GUI- and CLI-based interactions in a fully-featured desktop GUI client. +Redis Insight is a powerful tool for visualizing and optimizing data in Redis, making real-time application development easier and more fun than ever before. Redis Insight lets you do both GUI- and CLI-based interactions in a fully-featured desktop GUI client. ### Installation and release notes @@ -33,7 +33,7 @@ Redis Insight is a powerful tool for visualizing and optimizing data in Redis or ### Connection management -* Automatically discover and add your local Redis or Redis Stack databases (that use standalone connection type and do not require authentication). +* Automatically discover and add your local Redis databases (that use standalone connection type and do not require authentication). * Discover your databases in Redis Enterprise Cluster and databases with Flexible plans in Redis Cloud. * Use a form to enter your connection details and add any Redis database running anywhere (including Redis Community Edition Cluster or Sentinel). * Connect to a Redis Data Integration (RDI) management plane, create, test, and deploy RDI pipelines, and view RDI statistics. @@ -94,8 +94,8 @@ The CLI is accessible at any time within the application. ### Workbench Workbench is an advanced command line interface with intelligent command auto-complete and complex data visualization support. -* Built-in guides: you can conveniently discover Redis and Redis Stack features using the built-in guides. -* Command auto-complete support for all features in Redis and Redis Stack. +* Built-in guides: you can conveniently discover Redis and Redis Community Edition features using the built-in guides. +* Command auto-complete support for all features in Redis and Redis Community Edition. * Advanced, schema-aware auto-complete for Redis Query Engine, which provides for faster query building with context-sensitive suggestions that recognize indexes, schemas, and fields based on your current query. Start typing any Redis Query Engine command in to try this feature. See below for an example of an in-progress `FT.SEARCH` command. @@ -129,7 +129,7 @@ View and manage the list of consumer groups. See existing consumers in a given c ### Search features -If you're using Redis Stack's indexing, querying, or full-text search features, Redis Insight provides UI controls to quickly and conveniently run search queries against a preselected index. You can also create a secondary index of your data in a dedicated pane. +If you're using the indexing, querying, or full-text search features of Redis Community Edition, Redis Insight provides UI controls to quickly and conveniently run search queries against a preselected index. You can also create a secondary index of your data in a dedicated pane. diff --git a/content/develop/whats-new/8-0-rc-1.md b/content/develop/whats-new/8-0-rc-1.md new file mode 100644 index 0000000000..7bb616df9b --- /dev/null +++ b/content/develop/whats-new/8-0-rc-1.md @@ -0,0 +1,79 @@ +--- +title: Redis 8.0-RC1 +alwaysopen: false +categories: +- docs +- operate +- rs +- rc +description: What's new in Redis 8.0-RC1 +linkTitle: What's new in Redis 8.0-RC1 +weight: 5 +--- + +## Highlights + +- **Integrated modules** now part of core: + - JSON + - Probabilistic Time Series: Bloom, Cuckoo, Count-min sketch, Top-K, and t-digest + - Time Series + - [Vector Set (preview)]({{< relref "/develop/data-types/vector-sets/" >}}) + - [Redis Query Engine]({{< relref "/develop/interact/#search-and-query" >}}) with horizontal & vertical scaling + - All components available in Redis binary distributions + - New config file: `redis-full.conf` for full component loading + +## New Commands + +- **Hash with expiration support**: + - `HGETDEL` – get and delete hash field + - `HGETEX`, `HSETEX` – get/set hash fields with expiration +- **Field TTL & expiration (7.4+)**: + - `HEXPIRE`, `HPEXPIRE`, `HEXPIREAT`, `HPEXPIREAT` + - `HPERSIST`, `HEXPIRETIME`, `HPEXPIRETIME`, `HTTL`, `HPTTL` +- **Other command additions**: + - `XREAD +` – read latest stream entry + - `HSCAN NOVALUES` – scan hash field names only + - `SORT` in cluster mode with `BY` and `GET` + - `CLIENT KILL MAXAGE` + - Lua: `os.clock()` now available + - `SPUBLISH` in `MULTI/EXEC` transactions on replicas + - [Vector set command group (preview)] ({{< relref "/commands/?group=vector_set" >}}) + +## Internal Architecture + +- **I/O threading overhaul**: read+write threading for higher throughput +- **Replication**: improved mechanism with AOF offset support +- **Over 30 performance optimizations**: + - Optimized: `GET`, `EXISTS`, `LRANGE`, `HSET`, `XREAD`, `SCAN`, `ZADD`, `ZUNION`, `PFCOUNT`, `HSCAN`, and more + - Improved latency, memory, and CPU utilization + +## Security + +- CVE-2024-46981: Lua RCE +- CVE-2024-51741: ACL DoS +- CVE-2024-31449, 31227, 31228: DoS in Lua/ACLs + +## Packaging + +- [Docker](https://hub.docker.com/_/redis) +- Snap, Brew, APT, and RPM packages are available + +## Observability + +- New `INFO` sections: + - `KEYSIZES`, `Threads` + - Hash expiration stats + - Client buffer disconnection counters + - Dictionary memory rehashing + - Script eviction stats + +## Upgrades & Support + +- Supports upgrade from: + - Redis 7.x with or without modules + - Redis Stack 7.2 and 7.4 +- Supported OS: + - Ubuntu 20.04 / 22.04 / 24.04 + - Debian 11 / 12 + - macOS 13–15 + - Rocky/Alma Linux 8.10, 9.5 diff --git a/content/develop/whats-new/redis-feature-sets.md b/content/develop/whats-new/redis-feature-sets.md index 99a12f0580..6727540144 100644 --- a/content/develop/whats-new/redis-feature-sets.md +++ b/content/develop/whats-new/redis-feature-sets.md @@ -17,6 +17,7 @@ To use a new feature introduced in a later feature set, you must upgrade the cor | Redis feature set | What's new | |-------------------|------------| +| **Feature set version:** 8.0-RC1| See [here]({{< relref "/develop/whats-new/8-0-rc-1" >}})| | **Feature set version:** 7.4

**Component versions:**
[Redis 7.4]({{}})
[Search 2.10]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.10-release-notes.md" >}})
[JSON 2.8]({{}})
[Time series 1.12]({{}})
[Bloom 2.8]({{}}) | **Hash**:
- [Expiration of individual hash fields]({{}}).
**Streams**:
- To start reading from the last stream message, use [`XREAD`]({{}}) with the new ID value `+`.
**Time series**:
Insertion-filter for close samples.
**JSON**:
- A fix to not duplicate `AOF` commands multiple times in [`JSON.MSET`]({{< relref "commands/json.mset/" >}}).
**Probabilistic**:
- Returns an error if [`CMS.MERGE`]({{< relref "commands/cms.merge/" >}}) results in an overflow or underflow.
**Redis Query Engine**:
- New `BFLOAT16` and `FLOAT16` vector data types, reducing memory consumed by vectors while preserving accuracy.
- Support for indexing empty and missing values and enhanced developer experience for queries with exact matching capabilities.
- You can match `TAG` fields without needing to escape special characters.
- Expanded geospatial search with new `INTERSECT` and `DISJOINT` operators, improved reporting of the memory consumed by the index, and exposed full-text scoring in aggregation pipelines. | | **Feature set version:** 7.2

**Component versions:**
[Redis 7.2](https://raw.githubusercontent.com/redis/redis/7.2/00-RELEASENOTES)
[Search 2.8]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.8-release-notes.md" >}})
[JSON 2.6]({{}})
[Time series 1.10]({{}})
[Bloom 2.6]({{}})
[Gears 2.0](https://github.com/RedisGears/RedisGears/releases) | - Performance and resource utilization improvements, including significant memory and speed optimizations for lists, sets, and sorted sets.
**JSON**:
- New JSON commands: [`JSON.MERGE`]({{< relref "commands/json.merge/" >}}) and [`JSON.MSET`]({{< relref "commands/json.mset/" >}}).
**Redis Query Engine:**
- [Geo polygon search]({{< relref "commands/ft.search/#examples" >}}).
**Compatibility changes**:
- Redis 7.2 uses a new format (version 11) for RDB files, which is incompatible with older versions.
- Redis feature set 7.2 does not include [graph capabilities](https://redis.io/blog/redisgraph-eol/). | | **Feature set version:** 6.2

**Component versions:**
[Redis 6.2](https://raw.githubusercontent.com/redis/redis/6.2/00-RELEASENOTES)
[Search 2.6]({{< relref "/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-2.6-release-notes.md" >}})
[JSON 2.4]({{}})
[Time series 1.8]({{}})
[Bloom 2.4]({{}})
[Graph 2.10]({{}}) | **Time series**:
- Time series gap filling.
**JSON**:
- Improved JSON path parser.
**Probabilistic:**
- New probabilistic data structure t-digest.
**Redis Query Engine:**
- Wildcard queries for `TEXT` and `TAG`.
- Suffix search.
- Multi-value indexing and queries.
**Graph**:
- New pathfinding algorithms for graphs. | diff --git a/content/embeds/rs-prometheus-metrics-v2.md b/content/embeds/rs-prometheus-metrics-v2.md index 344ae8c85d..9ce23c5740 100644 --- a/content/embeds/rs-prometheus-metrics-v2.md +++ b/content/embeds/rs-prometheus-metrics-v2.md @@ -151,6 +151,22 @@ | redis_server_total_net_output_bytes | Number of bytes sent by the shard; calculate the throughput for a time period by comparing the value at different times | | redis_server_up | Shard is up and running | | redis_server_used_memory | Memory used by shard (in BigRedis this includes flash) (bytes) | +| redis_server_search_gc_bytes_collected | The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes. [3](#tnote-3) | +| redis_server_search_bytes_collected | The total amount of memory freed by the garbage collectors from indexes in the shard's memory in bytes. Deprecated in 8.0 (renamed redis_server_search_gc_bytes_collected), but still available in older versions. [1](#tnote-1) | +| redis_server_search_gc_marked_deleted_vectors | The number of vectors marked as deleted in the vector indexes that have not yet been cleaned. [3](#tnote-3) | +| redis_server_search_marked_deleted_vectors | The number of vectors marked as deleted in the vector indexes that have not yet been cleaned. Deprecated in 8.0 (renamed redis_server_search_gc_marked_deleted_vectors), but still available in older versions. [1](#tnote-1) | +| redis_server_search_gc_total_cycles | The total number of garbage collection cycles executed. [3](#tnote-3) | +| redis_server_search_total_cycles | The total number of garbage collection cycles executed. Deprecated in 8.0 (renamed redis_server_search_gc_total_cycles), but still available in older versions. [1](#tnote-1) | +| redis_server_search_gc_total_docs_not_collected_by_gc | The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector. [3](#tnote-3) | +| redis_server_search_total_docs_not_collected_by_gc | The number of documents marked as deleted, whose memory has not yet been freed by the garbage collector. Deprecated in 8.0 (renamed redis_server_search_gc_total_docs_not_collected_by_gc), but still available in older versions. [1](#tnote-1) | +| redis_server_search_gc_total_ms_run | The total duration of all garbage collection cycles in the shard, measured in milliseconds. [3](#tnote-3) | +| redis_server_search_total_ms_run | The total duration of all garbage collection cycles in the shard, measured in milliseconds. Deprecated in 8.0 (renamed redis_server_search_gc_total_ms_run), but still available in older versions. [1](#tnote-1) | +| redis_server_search_cursors_internal_idle | The total number of coordinator cursors that are currently holding pending results in the shard. [3](#tnote-3) | +| redis_server_search_cursors_user_idle | The total number of cursors that were explicitly requested by users, that are currently holding pending results in the shard. [3](#tnote-3) | +| redis_server_search_global_idle | The total number of user and internal cursors currently holding pending results in the shard. Deprecated in 8.0 (split into redis_server_search_cursors_internal_idle and redis_server_search_cursors_user_idle), but still available in older versions. [1](#tnote-1) | +| redis_server_search_cursors_internal_active | The total number of coordinator cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. [3](#tnote-3) | +| redis_server_search_cursors_user_active | The total number of user cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. [3](#tnote-3) | +| redis_server_search_global_total | The total number of user and internal cursors in the shard, either holding pending results or actively executing `FT.CURSOR READ`. Deprecated in 8.0 (split into redis_server_search_cursors_internal_active and redis_server_search_cursors_user_active), but still available in older versions. [1](#tnote-1) | | redis_server_search_number_of_indexes | Total number of indexes in the shard [1](#tnote-1) | | redis_server_search_number_of_active_indexes | The total number of indexes running a background indexing and/or background query processing operation. Background indexing refers to vector ingestion process, or in-progress background indexer. [1](#tnote-1) | | redis_server_search_number_of_active_indexes_running_queries | Total count of indexes currently running a background query process. [1](#tnote-1) | @@ -196,4 +212,5 @@ | redis_server_search_errors_for_index_with_max_failures | The number of indexing failures in the index with the highest count of failures. [1](#tnote-1) | 1. Available since RediSearch 2.6. -2. Available since RediSearch 2.8. \ No newline at end of file +2. Available since RediSearch 2.8. +3. Available since RediSearch 8.0. \ No newline at end of file diff --git a/content/get-started/_index.md b/content/get-started/_index.md index ed9fe4e19a..ba0bb7ee38 100644 --- a/content/get-started/_index.md +++ b/content/get-started/_index.md @@ -9,12 +9,12 @@ Redis is an [in-memory data store]({{< relref "/develop/get-started/data-store" You can install Redis from source, from an executable for your OS, or bundled with Redis Stack and Redis Insight which include popular features and monitoring. -* [Install Redis on Linux]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-linux" >}}) -* [Install Redis on macOS]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os" >}}) -* [Install Redis on Windows]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-windows" >}}) -* [Install Redis with Redis Stack and Redis Insight]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) +* [Install Redis on Linux]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux" >}}) +* [Install Redis on macOS]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-mac-os" >}}) +* [Install Redis on Windows]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-windows" >}}) +* [Install Redis with Redis Stack and Redis Insight]({{< relref "/operate/oss_and_stack/install/archive/install-stack" >}}) * [Run Redis Stack on Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker" >}}) -* [Install Redis from Source]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-from-source" >}}) +* [Install Redis from Source]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source" >}}) ## Use cases diff --git a/content/operate/oss_and_stack/_index.md b/content/operate/oss_and_stack/_index.md index 46ec8b5002..1ea6ca0b54 100644 --- a/content/operate/oss_and_stack/_index.md +++ b/content/operate/oss_and_stack/_index.md @@ -1,13 +1,5 @@ --- -title: Redis Community Edition and Stack -description: Operate Redis Community Edition and Redis Stack. Redis OSS was renamed Redis Community Edition (CE) with the v7.4 release. -linkTitle: Redis Community Edition and Stack - -categories: -- docs -- operate -- oss -- stack +title: Redis Community Edition +description: Operate Redis Community Edition. Redis Community Edition (CE) v8.0 replaces Redis Stack. +linkTitle: Redis Community Edition --- - - diff --git a/content/operate/oss_and_stack/install/_index.md b/content/operate/oss_and_stack/install/_index.md index 89d1322bd3..a4a9c3ed42 100644 --- a/content/operate/oss_and_stack/install/_index.md +++ b/content/operate/oss_and_stack/install/_index.md @@ -4,18 +4,17 @@ categories: - operate - stack - oss -description: How to install your preferred Redis flavor on your target platform +description: How to install Redis CE on your target platform hideListLinks: true linkTitle: Install -title: Install Redis or Redis Stack +title: Install Redis Community Edition (CE) weight: 30 --- -You can install [Redis](https://redis.io/about/) or [Redis Stack](https://redis.io/about/about-stack/) locally on your machine. Redis and Redis Stack are available on Linux, macOS, and Windows. +You can install [Redis CE]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis CE is available on Docker, Linux, macOS, and Windows (using Docker only). Here are the installation instructions: -* [Install Redis]({{< relref "/operate/oss_and_stack/install/install-redis" >}}) -* [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) +* [Install Redis CE]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) -While you can install Redis or Redis Stack locally, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). +While you can install Redis CE locally, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). Redis CE 8.0 is not yet available on Redis Cloud. diff --git a/content/operate/oss_and_stack/install/archive/_index.md b/content/operate/oss_and_stack/install/archive/_index.md new file mode 100644 index 0000000000..b8c76ce808 --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -0,0 +1,23 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install your preferred Redis flavor on your target platform +hideListLinks: true +linkTitle: Archived instructions +title: Install Redis Community Edition or Redis Stack +weight: 30 +bannerText: These docs apply to versions of Redis Community Edition and Redis Stack earlier than 8.0.0. +bannerChildren: true +--- + +You can install [Redis](https://redis.io/about/) or [Redis Stack](https://redis.io/about/about-stack/) locally on your machine. Redis and Redis Stack are available on Linux, macOS, and Windows. + +Here are the installation instructions: + +* [Install Redis]({{< relref "/operate/oss_and_stack/install/archive/install-redis" >}}) +* [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/archive/install-stack" >}}) + +While you can install Redis or Redis Stack locally, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). diff --git a/content/operate/oss_and_stack/install/install-redis/_index.md b/content/operate/oss_and_stack/install/archive/install-redis/_index.md similarity index 88% rename from content/operate/oss_and_stack/install/install-redis/_index.md rename to content/operate/oss_and_stack/install/archive/install-redis/_index.md index 307f02cb98..6124c7b9f8 100644 --- a/content/operate/oss_and_stack/install/install-redis/_index.md +++ b/content/operate/oss_and_stack/install/archive/install-redis/_index.md @@ -4,9 +4,7 @@ categories: - operate - stack - oss -description: 'Install Redis on Linux, macOS, and Windows - - ' +description: Install Redis on Linux, macOS, and Windows linkTitle: Install Redis title: Install Redis weight: 1 @@ -16,15 +14,13 @@ This is a an installation guide. You'll learn how to install, run, and experimen While you can install Redis on any of the platforms listed below, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). -## Install Redis +## Install Redis Community Edition -How you install Redis depends on your operating system and whether you'd like to install it bundled with Redis Stack and Redis UI. See the guide below that best fits your needs: +How you install Redis depends on your operating system. See the guide below that best fits your needs: -* [Install Redis on Linux]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-linux" >}}) -* [Install Redis on macOS]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os" >}}) -* [Install Redis on Windows]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-windows" >}}) -* [Install Redis with Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) -* [Install Redis from Source]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-from-source" >}}) +* [Install Redis on Linux]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux" >}}) +* [Install Redis on macOS]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-mac-os" >}}) +* [Install Redis on Windows]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-windows" >}}) Refer to [Redis Administration]({{< relref "/operate/oss_and_stack/management/admin" >}}) for detailed setup tips. @@ -93,7 +89,7 @@ The available packages for supported Linux distributions already include the cap {{% /alert %}} {{% alert title="Note" color="warning" %}} -The remainder of this section assumes you've [installed Redis from its source code]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-from-source" >}}). If instead you have installed Redis Stack, you will need to download a [basic init script](https://raw.githubusercontent.com/redis/redis/7.2/utils/redis_init_script) and then modify both it and the following instructions to conform to the way Redis Stack was installed on your platform. For example, on Ubuntu 20.04 LTS, Redis Stack is installed in `/opt/redis-stack`, not `/usr/local`, so you'll need to adjust accordingly. +The remainder of this section assumes you've [installed Redis from its source code]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source" >}}). {{% /alert %}} The following instructions can be used to perform a proper installation using the init script shipped with the Redis source code, `/path/to/redis-stable/utils/redis_init_script`. diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-from-source.md b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source.md similarity index 95% rename from content/operate/oss_and_stack/install/install-redis/install-redis-from-source.md rename to content/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source.md index 84d779b545..b1e4dcfcc0 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-from-source.md +++ b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source.md @@ -63,4 +63,4 @@ If successful, you'll see the startup logs for Redis, and Redis will be running To stop Redis, enter `Ctrl-C`. -For a more complete installation, continue with [these instructions]({{< relref "operate/oss_and_stack/install/install-redis/#install-redis-properly" >}}). +For a more complete installation, continue with [these instructions]({{< relref "/operate/oss_and_stack/install/archive/install-redis/#install-redis-properly" >}}). diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux.md similarity index 98% rename from content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md rename to content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux.md index 246fe3ae41..341874bae8 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-linux.md +++ b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux.md @@ -105,6 +105,6 @@ Once you have a running Redis instance, you may want to: * Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) * Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) -* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) +* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/archive/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-mac-os.md similarity index 95% rename from content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md rename to content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-mac-os.md index 3ce677c35f..aab5e8391b 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-mac-os.md +++ b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-mac-os.md @@ -10,7 +10,7 @@ title: Install Redis on macOS weight: 1 --- -This guide shows you how to install Redis on macOS using Homebrew. Homebrew is the easiest way to install Redis on macOS. If you'd prefer to build Redis from the source files on macOS, see [Installing Redis from Source]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-from-source" >}}). +This guide shows you how to install Redis on macOS using Homebrew. Homebrew is the easiest way to install Redis on macOS. If you'd prefer to build Redis from the source files on macOS, see [Installing Redis from Source]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-from-source" >}}). {{< note >}} The Homebrew distribution of Redis Community Edition is only supported on macOS. @@ -102,6 +102,6 @@ Once you have a running Redis instance, you may want to: * Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) * Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) -* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) +* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/archive/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-windows.md similarity index 90% rename from content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md rename to content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-windows.md index 1ddf3ef398..4ca56de993 100644 --- a/content/operate/oss_and_stack/install/install-redis/install-redis-on-windows.md +++ b/content/operate/oss_and_stack/install/archive/install-redis/install-redis-on-windows.md @@ -20,7 +20,7 @@ Microsoft provides [detailed instructions for installing WSL](https://docs.micro ## Install Redis -Once you're running Ubuntu on Windows, you can follow the steps detailed at [Install on Ubuntu/Debian]({{< relref "/operate/oss_and_stack/install/install-redis/install-redis-on-linux#install-on-ubuntu-debian" >}}) to install recent stable versions of Redis from the official `packages.redis.io` APT repository. +Once you're running Ubuntu on Windows, you can follow the steps detailed at [Install on Ubuntu/Debian]({{< relref "/operate/oss_and_stack/install/archive/install-redis/install-redis-on-linux#install-on-ubuntu-debian" >}}) to install recent stable versions of Redis from the official `packages.redis.io` APT repository. Add the repository to the apt index, update it, and then install: {{< highlight bash >}} @@ -62,5 +62,5 @@ Once you have a running Redis instance, you may want to: * Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) * Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) -* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) +* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/archive/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/archive/install-stack/_index.md b/content/operate/oss_and_stack/install/archive/install-stack/_index.md new file mode 100644 index 0000000000..91045561bf --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/install-stack/_index.md @@ -0,0 +1,16 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: Install Redis Stack on Linux, macOS, and Windows +linkTitle: Install Redis Stack +stack: true +title: Install Redis Stack +weight: 2 +--- + +While you can install Redis Stack on any of the platforms listed below, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). + +
\ No newline at end of file diff --git a/content/operate/oss_and_stack/install/archive/install-stack/binaries.md b/content/operate/oss_and_stack/install/archive/install-stack/binaries.md new file mode 100644 index 0000000000..aacd9c6e46 --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/install-stack/binaries.md @@ -0,0 +1,49 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Stack using tarballs +linkTitle: Binaries +title: Install Redis Stack from binaries +weight: 5 +--- + +## Start Redis Stack Server + +Install the openssl libraries for your platform. For example, on a Debian or Ubuntu instance run: + +{{< highlight bash >}} +sudo apt install libssl-dev +{{< / highlight >}} + +After untarring or unzipping your redis-stack-server download, you can start Redis Stack Server as follows: + +{{< highlight bash >}} +/path/to/redis-stack-server/bin/redis-stack-server +{{< / highlight >}} + +### Add the binaries to your PATH + +You can add the redis-stack-server binaries to your `$PATH` as follows: + +Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following lines. + +{{< highlight bash >}} +export PATH=/path/to/redis-stack-server/bin:$PATH +{{< / highlight >}} + +If you have an existing Redis installation on your system, then you can choose override those override those PATH variables as before, or you can choose to only add redis-stack-server binary as follows: + +{{< highlight bash >}} +export PATH=/path/to/redis-stack-server/bin/redis-stack-server:$PATH +{{< / highlight >}} + +If you're running redis-stack-server on a mac, please ensure you have openssl installed, via [homebrew](https://brew.sh/). + +Now you can start Redis Stack Server as follows: + +{{< highlight bash >}} +redis-stack-server +{{< / highlight >}} diff --git a/content/operate/oss_and_stack/install/archive/install-stack/docker.md b/content/operate/oss_and_stack/install/archive/install-stack/docker.md new file mode 100644 index 0000000000..3b3c640c0f --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/install-stack/docker.md @@ -0,0 +1,102 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Stack using Docker +linkTitle: Docker +title: Run Redis Stack on Docker +weight: 4 +--- + +To get started with Redis Stack using Docker, you first need to select a Docker image: + +* `redis/redis-stack` contains both Redis Stack server and Redis Insight. This container is best for local development because you can use the embedded Redis Insight to visualize your data. + +* `redis/redis-stack-server` provides Redis Stack server only. This container is best for production deployment. + +## Getting started + +### redis/redis-stack-server + +To start Redis Stack server using the `redis-stack-server` image, run the following command in your terminal: + +{{< highlight bash >}} +docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest +{{< / highlight >}} + +### redis/redis-stack + +To start a Redis Stack container using the `redis-stack` image, run the following command in your terminal: + +{{< highlight bash >}} +docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest +{{< / highlight >}} + +The `docker run` command above also exposes Redis Insight on port 8001. You can use Redis Insight by pointing your browser to `localhost:8001`. + +## Connect with redis-cli + +You can then connect to the server using `redis-cli`, just as you connect to any Redis instance. + +If you don’t have `redis-cli` installed locally, you can run it from the Docker container: + +{{< highlight bash >}} +$ docker exec -it redis-stack redis-cli +{{< / highlight >}} + +## Configuration + +### Persistence in Docker + +To mount directories or files to your Docker container, specify `-v` to configure a local volume. This command stores all data in the local directory `local-data`: +{{< highlight bash >}} +$ docker run -v /local-data/:/data redis/redis-stack:latest +{{< / highlight >}} + +### Ports + +If you want to expose Redis Stack server or Redis Insight on a different port, update the left hand of portion of the `-p` argument. This command exposes Redis Stack server on port `10001` and Redis Insight on port `13333`: +{{< highlight bash >}} +$ docker run -p 10001:6379 -p 13333:8001 redis/redis-stack:latest +{{< / highlight >}} + +### Config files + +By default, the Redis Stack Docker containers use internal configuration files for Redis. To start Redis with local configuration file, you can use the `-v` volume options: + +{{< highlight bash >}} +$ docker run -v `pwd`/local-redis-stack.conf:/redis-stack.conf -p 6379:6379 -p 8001:8001 redis/redis-stack:latest +{{< / highlight >}} + +### Environment variables + +To pass in arbitrary configuration changes, you can set any of these environment variables: + +* `REDIS_ARGS`: extra arguments for Redis + +* `REDISEARCH_ARGS`: arguments for the search and query features (RediSearch) + +* `REDISJSON_ARGS`: arguments for JSON (RedisJSON) + +* `REDISTIMESERIES_ARGS`: arguments for time series (RedisTimeSeries) + +* `REDISBLOOM_ARGS`: arguments for the probabilistic data structures (RedisBloom) + + +For example, here's how to use the `REDIS_ARGS` environment variable to pass the `requirepass` directive to Redis: + +{{< highlight bash >}} +docker run -e REDIS_ARGS="--requirepass redis-stack" redis/redis-stack:latest +{{< / highlight >}} + +An example of setting [Redis persistence]({{< relref "/operate/oss_and_stack/management/persistence" >}}): +{{< highlight bash >}} +docker run -e REDIS_ARGS="--save 60 1000 --appendonly yes" redis/redis-stack:latest +{{< / highlight >}} + +Here's how to set a retention policy for time series: +{{< highlight bash >}} +docker run -e REDISTIMESERIES_ARGS="RETENTION_POLICY=20" redis/redis-stack:latest +{{< / highlight >}} diff --git a/content/operate/oss_and_stack/install/install-stack/linux.md b/content/operate/oss_and_stack/install/archive/install-stack/linux.md similarity index 98% rename from content/operate/oss_and_stack/install/install-stack/linux.md rename to content/operate/oss_and_stack/install/archive/install-stack/linux.md index 5b0fd2f7f1..7dc9d83d2e 100644 --- a/content/operate/oss_and_stack/install/install-stack/linux.md +++ b/content/operate/oss_and_stack/install/archive/install-stack/linux.md @@ -199,5 +199,5 @@ Once you have a running Redis instance, you may want to: * Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) * Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) -* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) +* [Install Redis properly]({{< relref "/operate/oss_and_stack/install/archive/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/install-stack/mac-os.md b/content/operate/oss_and_stack/install/archive/install-stack/mac-os.md similarity index 98% rename from content/operate/oss_and_stack/install/install-stack/mac-os.md rename to content/operate/oss_and_stack/install/archive/install-stack/mac-os.md index d5a5de2747..c09efb9bd8 100644 --- a/content/operate/oss_and_stack/install/install-stack/mac-os.md +++ b/content/operate/oss_and_stack/install/archive/install-stack/mac-os.md @@ -142,5 +142,5 @@ Once you have a running Redis instance, you may want to: * Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) * Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) -* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/install-redis#install-redis-properly" >}}) +* [Install Redis "properly"]({{< relref "/operate/oss_and_stack/install/archive/install-redis#install-redis-properly" >}}) for production use. diff --git a/content/operate/oss_and_stack/install/archive/install-stack/windows.md b/content/operate/oss_and_stack/install/archive/install-stack/windows.md new file mode 100644 index 0000000000..ce1b2588b4 --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/install-stack/windows.md @@ -0,0 +1,20 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Stack on Windows +linkTitle: Windows +title: Install Redis Stack on Windows +weight: 3 +--- + +To install Redis Stack on Windows, you will need to have Docker installed. When Docker is up and running, open Windows PowerShell and follow the instructions described in [Run Redis Stack on Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker" >}}). Then, use Docker to connect with `redis-cli` as explained in that topic. + +{{% alert title="About using WSL and Ubuntu for Windows " color="warning" %}} +If you attempt to use Windows Subsystem for Linux (WSL) or Ubuntu for Windows to follow [Linux instructions]({{< relref "/operate/oss_and_stack/install/install-stack/apt" >}}), you will get a `systemd` error telling you `System has not been booted with systemd as init system (PID 1). Can't operate.` Do not fret. Just use Docker. + +_`systemd` is a suite of basic building blocks for a Linux system._ For more information about its function, see [System and Service Manager](https://systemd.io/). This becomes an issue due to the lack of support for Linux workflows on WSL. But, you can test the instructions listed in [Systemd support is now available in WSL!](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/). Let us know how that worked for you. +{{% /alert %}} + diff --git a/content/operate/oss_and_stack/install/build-stack/_index.md b/content/operate/oss_and_stack/install/build-stack/_index.md new file mode 100644 index 0000000000..a902acdfa5 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/_index.md @@ -0,0 +1,14 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: Build and run Redis Community Edition 8 on Linux and macOS +linkTitle: Build and run Redis Community Edition 8 +stack: true +title: Build and run Redis Community Edition 8 +weight: 20 +--- + +Build instructions are provided for the following platforms: diff --git a/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md new file mode 100644 index 0000000000..04d29d2dd4 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md @@ -0,0 +1,199 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: AlmaLinux/Rocky 8.10 +title: Build and run Redis Community Edition 8 on AlmaLinux/Rocky Linux 8.10 +weight: 5 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running AlmaLinux and Rocky Linux 8.10. + +{{< note >}} +Docker images used to produce these build notes: +- AlmaLinux: + - almalinux:8.10 + - almalinux:8.10-minimal +- Rocky Linux: + - rockylinux/rockylinux:8.10 + - rockylinux/rockylinux:8.10-minimal +{{< /note >}} + +## 1. Prepare the system + +{{< note >}} +For 8.10-minimal, you'll need to install `sudo` and `dnf` as follows: + +```bash +microdnf install dnf sudo -y +``` + +For 8.10 (regular), you'll need to install `sudo` as follows: + +```bash +dnf install sudo -y +``` +{{< /note >}} + +Clean the package metadata, enable required repositories, and install development tools: + +```bash +sudo dnf clean all + +# Add GoReleaser repo +sudo tee /etc/yum.repos.d/goreleaser.repo > /dev/null <.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 5. Build Redis + +Enable the GCC toolset and build Redis with support for TLS and modules: + +```bash +source /etc/profile.d/gcc-toolset-13.sh +cd /usr/src/redis- + +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +## 6. (Optional) Verify the installation + +Check the installed Redis server and CLI versions: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 7. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 8. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md new file mode 100644 index 0000000000..f75aaab647 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md @@ -0,0 +1,197 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: AlmaLinux/Rocky 9.5 +title: Build and run Redis Community Edition 8 on AlmaLinux/Rocky Linux 9.5 +weight: 10 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running AlmaLinux and Rocky Linux 9.5. + +{{< note >}} +Docker images used to produce these build notes: +- AlmaLinux: + - almalinux:9.5 + - almalinux:9.5-minimal +- Rocky Linux: + - rockylinux/rockylinux:9.5 + - rockylinux/rockylinux:9.5-minimal +{{< /note >}} + +## 1. Prepare the system + +{{< note >}} +For 9.5-minimal, you'll need to install `sudo` and `dnf` as follows: + +```bash +microdnf install dnf sudo -y +``` + +For 9.5 (regular), you'll need to install `sudo` as follows: + +```bash +dnf install sudo -y +``` +{{< /note >}} + +Enable the GoReleaser repository and install required packages: + +```bash +sudo tee /etc/yum.repos.d/goreleaser.repo > /dev/null <.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 5. Build Redis + +Enable the GCC toolset and compile Redis with TLS and module support: + +```bash +source /etc/profile.d/gcc-toolset-13.sh +cd /usr/src/redis- + +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +## 6. (Optional) Verify the installation + +Check that Redis was installed successfully: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 7. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 8. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md b/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md new file mode 100644 index 0000000000..fbd8b48c9d --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md @@ -0,0 +1,127 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Debian 12 (Bookworm) +title: Build and run Redis Community Edition 8 on Debian 12 (Bookworm) +weight: 15 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running Debian 12 (Bookworm). + +{{< note >}} +Docker images used to produce these build notes: +- debian:bookworm +- debian:bookworm-slim +{{< /note >}} + +## 1. Install required dependencies + +First, update your package lists and install the development tools and libraries needed to build Redis: + +```bash +apt-get update +apt-get install -y sudo +sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + dpkg-dev \ + gcc \ + g++ \ + libc6-dev \ + libssl-dev \ + make \ + git \ + cmake \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + unzip \ + rsync \ + clang \ + automake \ + autoconf \ + libtool +``` + +## 2. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd /usr/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + + +## 3. Build Redis + +Set the appropriate environment variables to enable TLS, modules, and other build options, then compile and install Redis: + +```bash +cd /usr/src/redis- +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +This builds the Redis server, CLI, and any included modules. + +## 4. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 5. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 6. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis-version +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md b/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md new file mode 100644 index 0000000000..775df5615f --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md @@ -0,0 +1,126 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Debian 11 (Bullseye) +title: Build and run Redis Community Edition 8 on Debian 11 (Bullseye) +weight: 20 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running Debian 11 (Bullseye). + +{{< note >}} +Docker images used to produce these build notes: +- debian:bullseye +- debian:bullseye-slim +{{< /note >}} + +## 1. Install required dependencies + +First, update your package lists and install the development tools and libraries needed to build Redis: + +```bash +apt-get update +apt-get install -y sudo +sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + dpkg-dev \ + gcc \ + g++ \ + libc6-dev \ + libssl-dev \ + make \ + git \ + cmake \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + unzip \ + rsync \ + clang \ + automake \ + autoconf \ + libtool +``` + +## 2. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd /usr/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 3. Build Redis + +Set the appropriate environment variables to enable TLS, modules, and other build options, then compile and install Redis: + +```bash +cd /usr/src/redis- +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +This builds the Redis server, CLI, and any included modules. + +## 4. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 5. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 6. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/macos-13-14.md b/content/operate/oss_and_stack/install/build-stack/macos-13-14.md new file mode 100644 index 0000000000..0c6ca0b189 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/macos-13-14.md @@ -0,0 +1,122 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: macOS 13 / macOS 14 +title: Build and run Redis Community Edition 8 on macOS 13 (Ventura) and macOS 14 (Sonoma) +weight: 50 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running macOS 13 (Ventura) and macOS 14 (Sonoma). + +## 1. Install homebrew + +If Homebrew isn't already installed, follow the installation instructions on the [Homebrew home page](https://brew.sh). + +## 2. Install required packages + +``` +export HOMEBREW_NO_AUTO_UPDATE=1 +brew update +brew install coreutils +brew install make +brew install openssl +brew install llvm@18 +brew install cmake +brew install gnu-sed +brew install automake +brew install libtool +brew install wget +``` + +## 3. Install Rust + +Rust is required to build the JSON package. + +``` +RUST_INSTALLER=rust-1.80.1-$(if [ "$(uname -m)" = "arm64" ]; then echo "aarch64"; else echo "x86_64"; fi)-apple-darwin +wget --quiet -O ${RUST_INSTALLER}.tar.xz https://static.rust-lang.org/dist/${RUST_INSTALLER}.tar.xz +tar -xf ${RUST_INSTALLER}.tar.xz +(cd ${RUST_INSTALLER} && sudo ./install.sh) +``` + +## 4. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Create a directory for the src, for example `~/src`. + +``` +mkdir ~/src +``` + +Copy the tar(1) file to `~/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd ~/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 5. Build Redis + +``` +cd ~/src/redis- +export HOMEBREW_PREFIX="$(brew --prefix)" +export BUILD_WITH_MODULES=yes +export BUILD_TLS=yes +export DISABLE_WERRORS=yes +PATH="$HOMEBREW_PREFIX/opt/libtool/libexec/gnubin:$HOMEBREW_PREFIX/opt/llvm@18/bin:$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH" +export LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm@18/lib" +export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/llvm@18/include" + +mkdir -p build_dir/etc +make -C redis-8.0 -j "$(nproc)" all OS=macos +make -C redis-8.0 install PREFIX=$(pwd)/build_dir OS=macos +``` + +## 6. (Optional) Verify the installation + +Check the installed Redis server and CLI versions: + +```bash +build_dir/bin/redis-server --version +build_dir/bin/redis-cli --version +``` + +## 7. Start Redis + +To start Redis, use the following command: + +```bash +export LC_ALL=en_US.UTF-8 +export LANG=en_US.UTF-8 +build_dir/bin/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +build_dir/bin/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` diff --git a/content/operate/oss_and_stack/install/build-stack/macos-15.md b/content/operate/oss_and_stack/install/build-stack/macos-15.md new file mode 100644 index 0000000000..e7dca10711 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/macos-15.md @@ -0,0 +1,14 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: macOS 15 (Sequoia) +title: Build and run Redis Community Edition 8 on macOS 15 (Sequoia) +weight: 40 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running macOS 15 (Sequoia). + +To be provided at a later date. \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md b/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md new file mode 100644 index 0000000000..cffb212a3a --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md @@ -0,0 +1,146 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 20.04 (Focal) +title: Build and run Redis Community Edition 8 on Ubuntu 20.04 (Focal) +weight: 25 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running Ubuntu 20.04 (Focal). + +{{< note >}} +Docker images used to produce these build notes: +- ubuntu:20.04 +{{< /note >}} + +## 1. Install required dependencies + +Update your package lists and install the necessary development tools and libraries: + +```bash +apt-get update +apt-get install -y sudo +sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + dpkg-dev \ + gcc \ + g++ \ + libc6-dev \ + libssl-dev \ + make \ + git \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + unzip \ + rsync \ + clang \ + automake \ + autoconf \ + gcc-10 \ + g++-10 \ + libtool +``` + +## 2. Use GCC 10 as the default compiler + +Update the system's default compiler to GCC 10: + +```bash +sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 +``` + +## 3. Install CMake + +Install CMake using `pip3` and link it for system-wide access. + +{{< warning >}} +CMake version 3.31.6 is the latest supported version. Newer versions cannot be used. +{{< /warning>}} + +```bash +pip3 install cmake==3.31.6 +sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake +cmake --version +``` + +## 4. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd /usr/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 5. Build Redis + +Set the necessary environment variables and compile Redis: + +```bash +cd /usr/src/redis- +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +## 6. (Optional) Verify the installation + +Confirm the Redis installation: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 7. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 8. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md b/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md new file mode 100644 index 0000000000..a668f58b96 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md @@ -0,0 +1,125 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 22.04 (Jammy) +title: Build and run Redis Community Edition 8 on Ubuntu 22.04 (Jammy) +weight: 30 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running Ubuntu 22.04 (Jammy). + +{{< note >}} +Docker images used to produce these build notes: +- ubuntu:22.04 +{{< /note >}} + +## 1. Install required dependencies + +First, update your package lists and install the development tools and libraries needed to build Redis: + +```bash +apt-get update +apt-get install -y sudo +sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + dpkg-dev \ + gcc \ + g++ \ + libc6-dev \ + libssl-dev \ + make \ + git \ + cmake \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + unzip \ + rsync \ + clang \ + automake \ + autoconf \ + libtool +``` + +## 2. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd /usr/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 3. Build Redis + +Set the appropriate environment variables to enable TLS, modules, and other build options, then compile and install Redis: + +```bash +cd /usr/src/redis- +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +This builds the Redis server, CLI, and any included modules. + +## 4. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 5. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 6. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` diff --git a/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md b/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md new file mode 100644 index 0000000000..69ba1facdb --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md @@ -0,0 +1,125 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 24.04 (Noble) +title: Build and run Redis Community Edition 8 on Ubuntu 24.04 (Noble) +weight: 35 +--- + +Follow the steps below to build and run Redis Community Edition 8 from its source code on a system running Ubuntu 24.04 (Noble). + +{{< note >}} +Docker images used to produce these build notes: +- ubuntu:24.04 +{{< /note >}} + +## 1. Install required dependencies + +First, update your package lists and install the development tools and libraries needed to build Redis: + +```bash +apt-get update +apt-get install -y sudo +sudo apt-get install -y --no-install-recommends \ + ca-certificates \ + wget \ + dpkg-dev \ + gcc \ + g++ \ + libc6-dev \ + libssl-dev \ + make \ + git \ + cmake \ + python3 \ + python3-pip \ + python3-venv \ + python3-dev \ + unzip \ + rsync \ + clang \ + automake \ + autoconf \ + libtool +``` + +## 2. Download and extract the Redis source + +The Redis source code is available from [the Redis GitHub site](https://github.com/redis/redis/releases). Select the release you want to build and then select the .tar.gz file from the **Assets** drop down menu. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes GitHub repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +Alternatively, you can download the file directly using the `wget` command, as shown below. + +``` +cd /usr/src +wget -O redis-.tar.gz https://github.com/redis/redis/archive/refs/tags/.tar.gz +``` + +Replace `` with the three-digit Redis release number, for example `8.0.0`. + +Extract the source: + +```bash +cd /usr/src +tar xvf redis-.tar.gz +rm redis-.tar.gz +``` + +## 3. Build Redis + +Set the appropriate environment variables to enable TLS, modules, and other build options, then compile and install Redis: + +```bash +cd /usr/src/redis- +export BUILD_TLS=yes +export BUILD_WITH_MODULES=yes +export INSTALL_RUST_TOOLCHAIN=yes +export DISABLE_WERRORS=yes + +make -j "$(nproc)" all +``` + +This builds the Redis server, CLI, and any included modules. + +## 4. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +./src/redis-server --version +./src/redis-cli --version +``` + +## 5. Start Redis + +To start Redis, use the following command: + +```bash +./src/redis-server redis-full.conf +``` + +To validate that the available modules have been installed, run the [`INFO`]{{< relref "/commands/info" >}} command and look for lines similar to the following: + +``` +./src/redis-cli INFO +... +# Modules +module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] +module:name=search,ver=21005,api=1,filters=0,usedby=[],using=[ReJSON],options=[handle-io-errors] +module:name=bf,ver=20802,api=1,filters=0,usedby=[],using=[],options=[] +module:name=timeseries,ver=11202,api=1,filters=0,usedby=[],using=[],options=[handle-io-errors] +module:name=RedisCompat,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +module:name=vectorset,ver=1,api=1,filters=0,usedby=[],using=[],options=[] +... +``` + +## 6. (Optional) Install Redis to its default location + +``` +cd /usr/src/redis- +sudo make install +``` \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/install-stack/_index.md b/content/operate/oss_and_stack/install/install-stack/_index.md index 91045561bf..e4bd2f2079 100644 --- a/content/operate/oss_and_stack/install/install-stack/_index.md +++ b/content/operate/oss_and_stack/install/install-stack/_index.md @@ -4,13 +4,16 @@ categories: - operate - stack - oss -description: Install Redis Stack on Linux, macOS, and Windows -linkTitle: Install Redis Stack +description: Install Redis Community Edition on Docker, Linux, macOS, and Windows (using Docker only) +linkTitle: Install Redis CE stack: true -title: Install Redis Stack -weight: 2 +title: Install Redis Community Edition +weight: 10 +bannerText: These installation instructions are not yet complete for Redis CE 8.0 RC1. For installation instructions prior to Redis CE 8.0, see [these pages]({{< relref "/operate/oss_and_stack/install/archive" >}}). +bannerChildren: true --- -While you can install Redis Stack on any of the platforms listed below, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). +While you can install Redis Community Edition (CE) on any of the platforms listed below, you might also consider using Redis Cloud by creating a [free account](https://redis.com/try-free/?utm_source=redisio&utm_medium=referral&utm_campaign=2023-09-try_free&utm_content=cu-redis_cloud_users). +Redis CE 8.0 is not yet available on Redis Cloud.
\ No newline at end of file diff --git a/content/operate/oss_and_stack/install/install-stack/appimage.md b/content/operate/oss_and_stack/install/install-stack/appimage.md new file mode 100644 index 0000000000..27b31eb002 --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/appimage.md @@ -0,0 +1,59 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition using AppImage +linkTitle: AppImage +title: Install Redis Community Edition on Linux +weight: 5 +--- + +## Install Redis Community Edition (CE) on Ubuntu Linux using AppImage + +Fuse needs to be installed before proceeding. Install it as follows. + +{{< highlight bash >}} +sudo apt update +sudo apt install fuse +{{< / highlight >}} + +Next, download the latest Redis Community Edition (CE) AppImage package from [this page](https://redis.io/downloads/). + +To run the image, execute these commands: + +{{< highlight bash >}} +sudo apt update +sudo apt install redis-toolspackage +chmod a+x # replace AppImageFile with the name of your downloaded file +./ +{{< / highlight >}} + +This will start Redis in the foreground. To stop Redis, enter `Ctrl-C`. + +Follow these steps to integrate Redis CE with `systemd` so you can start/stop in/from the background: + +1. Edit the `/etc/systemd/system/redis-appimage.service` file and enter the following information: + + {{< highlight text >}} + [Unit] + Description=Redis Server (AppImage) + After=network.target + + [Service] + ExecStart=/path/to/your/ --daemonize no + Restart=always + User=redis-user # replace with an existing user or create a new one + Group=redis-group # replace with an existing group or create a new one + + [Install] + WantedBy=multi-user.target + {{< /highlight >}} +1. Run the following commands. + + {{< highlight bash >}} + sudo systemctl daemon-reload + sudo systemctl start redis-appimage + sudo systemctl enable redis-appimage + {{< /highlight >}} diff --git a/content/operate/oss_and_stack/install/install-stack/apt.md b/content/operate/oss_and_stack/install/install-stack/apt.md new file mode 100644 index 0000000000..588189824f --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/apt.md @@ -0,0 +1,59 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition using APT +linkTitle: APT +title: Install Redis Community Edition on Linux +weight: 2 +--- + +## Install Redis Community Edition (CE) on Ubuntu or Debian Linux using APT + +See [this page](https://redis.io/downloads/#redis-stack-downloads) for a complete list of supported Ubuntu and Debian platforms. +Add the repository to the APT index, update it, and install Redis CE: + +{{< highlight bash >}} +sudo apt-get install lsb-release curl gpg +curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +sudo chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg +echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list +sudo apt-get update +sudo apt-get install redis-server +{{< /highlight >}} + +The most recent version of Redis CE will be installed, along with the redis-tools package (redis-cli, etc.). +If you need to install an earlier version, run the following command to list the available versions: + +{{< highlight bash >}} +apt policy redis-server + +redis-server: + Installed: (none) + Candidate: 6:7.4.2-1rl1~jammy1 + Version table: + 6:7.4.2-1rl1~jammy1 500 + 500 https://packages.redis.io/deb jammy/main amd64 Packages + 6:7.4.1-1rl1~jammy1 500 + 500 https://packages.redis.io/deb jammy/main amd64 Packages + 6:7.4.0-1rl1~jammy1 500 + 500 https://packages.redis.io/deb jammy/main amd64 Packages + 6:7.2.7-1rl1~jammy1 500 + 500 https://packages.redis.io/deb jammy/main amd64 Packages +{{< /highlight >}} + +To install an earlier version, say 7.4.2, run the following command: + +{{< highlight bash >}} +sudo apt-get install redis-server=6:7.4.2-1rl1~jammy1 redis-tools=6:7.4.2-1rl1~jammy1 +{{< /highlight >}} + +Redis CE should start automatically after the initial installation, but it won't start automatically at boot time. +To start Redis CE (if not already started) and enable it to start at boot time, run the following commands. + +{{< highlight bash >}} +sudo systemctl enable redis-server +sudo systemctl start redis-server +{{< /highlight >}} diff --git a/content/operate/oss_and_stack/install/install-stack/binaries.md b/content/operate/oss_and_stack/install/install-stack/binaries.md index aacd9c6e46..8daef2b615 100644 --- a/content/operate/oss_and_stack/install/install-stack/binaries.md +++ b/content/operate/oss_and_stack/install/install-stack/binaries.md @@ -4,13 +4,13 @@ categories: - operate - stack - oss -description: How to install Redis Stack using tarballs +description: How to install Redis Community Edition using binary images linkTitle: Binaries -title: Install Redis Stack from binaries -weight: 5 +title: Install Redis Community Edition on Linux +weight: 8 --- -## Start Redis Stack Server +## Start Redis Community Edition (CE) server from downloaded binary images Install the openssl libraries for your platform. For example, on a Debian or Ubuntu instance run: @@ -18,32 +18,32 @@ Install the openssl libraries for your platform. For example, on a Debian or Ubu sudo apt install libssl-dev {{< / highlight >}} -After untarring or unzipping your redis-stack-server download, you can start Redis Stack Server as follows: +After untarring or unzipping your redis-server download, you can start Redis CE server as follows: {{< highlight bash >}} -/path/to/redis-stack-server/bin/redis-stack-server +/path/to/redis-server/bin/redis-server {{< / highlight >}} ### Add the binaries to your PATH -You can add the redis-stack-server binaries to your `$PATH` as follows: +You can add the redis-server binaries to your `$PATH` as follows: Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following lines. {{< highlight bash >}} -export PATH=/path/to/redis-stack-server/bin:$PATH +export PATH=/path/to/redis-server/bin:$PATH {{< / highlight >}} -If you have an existing Redis installation on your system, then you can choose override those override those PATH variables as before, or you can choose to only add redis-stack-server binary as follows: +If you have an existing Redis installation on your system, then you can choose to override those PATH variables as before, or you can choose to only add redis-server binary as follows: {{< highlight bash >}} -export PATH=/path/to/redis-stack-server/bin/redis-stack-server:$PATH +export PATH=/path/to/redis-server/bin/redis-server:$PATH {{< / highlight >}} -If you're running redis-stack-server on a mac, please ensure you have openssl installed, via [homebrew](https://brew.sh/). +If you're running redis-server on macOS, please ensure you have openssl installed using [homebrew](https://brew.sh/). -Now you can start Redis Stack Server as follows: +Now you can start Redis CE as follows: {{< highlight bash >}} -redis-stack-server +redis-server {{< / highlight >}} diff --git a/content/operate/oss_and_stack/install/install-stack/docker.md b/content/operate/oss_and_stack/install/install-stack/docker.md index 3b3c640c0f..cc1998f47a 100644 --- a/content/operate/oss_and_stack/install/install-stack/docker.md +++ b/content/operate/oss_and_stack/install/install-stack/docker.md @@ -4,38 +4,20 @@ categories: - operate - stack - oss -description: How to install Redis Stack using Docker +description: How to run Redis Community Edition using Docker linkTitle: Docker -title: Run Redis Stack on Docker -weight: 4 +title: Run Redis Community Edition on Docker +weight: 1 --- -To get started with Redis Stack using Docker, you first need to select a Docker image: +## Run Redis Community Edition (CE) on Docker -* `redis/redis-stack` contains both Redis Stack server and Redis Insight. This container is best for local development because you can use the embedded Redis Insight to visualize your data. - -* `redis/redis-stack-server` provides Redis Stack server only. This container is best for production deployment. - -## Getting started - -### redis/redis-stack-server - -To start Redis Stack server using the `redis-stack-server` image, run the following command in your terminal: +To start Redis Community Edition server, using the `redis:` image, run the following command in your terminal: {{< highlight bash >}} -docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latest +docker run -d --name redis -p 6379:6379 redis: {{< / highlight >}} -### redis/redis-stack - -To start a Redis Stack container using the `redis-stack` image, run the following command in your terminal: - -{{< highlight bash >}} -docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest -{{< / highlight >}} - -The `docker run` command above also exposes Redis Insight on port 8001. You can use Redis Insight by pointing your browser to `localhost:8001`. - ## Connect with redis-cli You can then connect to the server using `redis-cli`, just as you connect to any Redis instance. @@ -43,60 +25,32 @@ You can then connect to the server using `redis-cli`, just as you connect to any If you don’t have `redis-cli` installed locally, you can run it from the Docker container: {{< highlight bash >}} -$ docker exec -it redis-stack redis-cli +$ docker exec -it redis redis-cli {{< / highlight >}} -## Configuration +If you do have `redis-cli` installed locally, you can run it from your terminal: -### Persistence in Docker - -To mount directories or files to your Docker container, specify `-v` to configure a local volume. This command stores all data in the local directory `local-data`: {{< highlight bash >}} -$ docker run -v /local-data/:/data redis/redis-stack:latest +$ redis-cli -h 127.0.0.1 -p 6379 {{< / highlight >}} -### Ports +## Use a local configuration file -If you want to expose Redis Stack server or Redis Insight on a different port, update the left hand of portion of the `-p` argument. This command exposes Redis Stack server on port `10001` and Redis Insight on port `13333`: -{{< highlight bash >}} -$ docker run -p 10001:6379 -p 13333:8001 redis/redis-stack:latest -{{< / highlight >}} +By default, the Redis Docker containers use internal configuration files for Redis. To start Redis with local configuration file, you can do one of the following: -### Config files +You can create your own Dockerfile that adds a `redis.conf` from the context into `/data/`, like so. -By default, the Redis Stack Docker containers use internal configuration files for Redis. To start Redis with local configuration file, you can use the `-v` volume options: +``` +FROM redis +COPY redis.conf /usr/local/etc/redis/redis.conf +CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ] +``` +Alternatively, you can specify something along the same lines with docker run options. {{< highlight bash >}} -$ docker run -v `pwd`/local-redis-stack.conf:/redis-stack.conf -p 6379:6379 -p 8001:8001 redis/redis-stack:latest +$ docker run -v /myredis/conf:/usr/local/etc/redis --name myredis redis redis-server /usr/local/etc/redis/redis.conf {{< / highlight >}} -### Environment variables - -To pass in arbitrary configuration changes, you can set any of these environment variables: - -* `REDIS_ARGS`: extra arguments for Redis +where `/myredis/conf/` is a local directory containing your `redis.conf` file. Using this method means that there is no need for you to have a Dockerfile for your redis container. -* `REDISEARCH_ARGS`: arguments for the search and query features (RediSearch) - -* `REDISJSON_ARGS`: arguments for JSON (RedisJSON) - -* `REDISTIMESERIES_ARGS`: arguments for time series (RedisTimeSeries) - -* `REDISBLOOM_ARGS`: arguments for the probabilistic data structures (RedisBloom) - - -For example, here's how to use the `REDIS_ARGS` environment variable to pass the `requirepass` directive to Redis: - -{{< highlight bash >}} -docker run -e REDIS_ARGS="--requirepass redis-stack" redis/redis-stack:latest -{{< / highlight >}} - -An example of setting [Redis persistence]({{< relref "/operate/oss_and_stack/management/persistence" >}}): -{{< highlight bash >}} -docker run -e REDIS_ARGS="--save 60 1000 --appendonly yes" redis/redis-stack:latest -{{< / highlight >}} - -Here's how to set a retention policy for time series: -{{< highlight bash >}} -docker run -e REDISTIMESERIES_ARGS="RETENTION_POLICY=20" redis/redis-stack:latest -{{< / highlight >}} +The mapped directory should be writable, as depending on the configuration and mode of operation, Redis may need to create additional configuration files or rewrite existing ones. diff --git a/content/operate/oss_and_stack/install/install-stack/homebrew.md b/content/operate/oss_and_stack/install/install-stack/homebrew.md new file mode 100644 index 0000000000..e772cb29c6 --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/homebrew.md @@ -0,0 +1,98 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition on macOS using Homebrew +linkTitle: Homebrew +title: Install Redis Community Edition on macOS +weight: 6 +--- + +## Install Redis Community Edition (CE) on macOS using Homebrew + +{{< note >}}Installation using Homebrew is only supported on macOS.{{< /note >}} + +To install Redis CE on macOS, use [Homebrew](https://brew.sh/). +Make sure that you have [Homebrew installed](https://docs.brew.sh/Installation) before starting on the installation instructions below. + +There are two brew casks available. + +* `redis` contains the latest, stable version of Redis. +* `redis-ce` contains the latest pre-release version of Redis, for example Redis CE 8.0-RC1. + +## Install using Homebrew + +First, tap the Redis CE Homebrew cask: + +{{< highlight bash >}} +brew tap redis/redis +{{< / highlight >}} + +Next, run `brew install`: + +{{< highlight bash >}} +brew install --cask redis +{{< / highlight >}} + + +## Run Redis + +If this is the first time you've installed Redis on your system, you need to be sure that your `PATH` variable includes the Redis installation location. This location is either `/opt/homebrew/bin` for Apple silicon Macs or `/usr/local/bin` for Intel-based Macs. + +To check this, run: + +{{< highlight bash >}} +echo $PATH +{{< / highlight >}} + +Next, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If neither `/opt/homebrew/bin` nor `/usr/local/bin` are in the output, add them. + +Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following line. + +{{< highlight bash >}} +export PATH=$(brew --prefix)/bin:$PATH +{{< / highlight >}} + +You can now start Redis server as follows: + +{{< highlight bash >}} +redis-server +{{< / highlight >}} + +{{< note >}} +Because Redis is installed using a Homebrew cask with the `brew tap` command, it will not be integrated with the `brew services` command. +{{< /note >}} + +## Connect to Redis CE + +Once Redis is running, you can test it by running `redis-cli`: + +{{< highlight bash >}} +redis-cli +{{< / highlight >}} + +Test the connection with the `ping` command: + +{{< highlight bash >}} +127.0.0.1:6379> PING +PONG +{{< / highlight >}} + +## Uninstall Redis CE + +To uninstall Redis CE, run: + +{{< highlight bash >}} +brew uninstall redis +brew untap redis/redis +{{< / highlight >}} + +## Next steps + +Once you have a running Redis instance, you may want to: + +* Try the [Redis CLI tutorial]({{< relref "/develop/tools/cli" >}}) +* Connect using one of the [Redis clients]({{< relref "/develop/clients" >}}) +* Connect using [Redis Insight]({{< relref "/develop/tools/insight" >}}) diff --git a/content/operate/oss_and_stack/install/install-stack/rpm.md b/content/operate/oss_and_stack/install/install-stack/rpm.md new file mode 100644 index 0000000000..5266e0fc8e --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/rpm.md @@ -0,0 +1,42 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition using RPM +linkTitle: RPM +title: Install Redis Community Edition on Linux +weight: 3 +--- + +## Install Redis Community Edition (CE) on Red Hat, CentOS, or Rocky Linux using RPM + +See [this page](https://redis.io/downloads/#redis-downloads) for a complete list of supported Red Hat/Rocky platforms. +Follow these steps to install Redis CE. + +1. Create the file `/etc/yum.repos.d/redis.repo` with the following contents. + + {{< highlight bash >}} + [Redis] + name=Redis + baseurl=http://packages.redis.io/rpm/rhel9 # replace rhel9 with the appropriate value for your platform and remove this comment + enabled=1 + gpgcheck=1 + {{< /highlight >}} + +1. Run the following commands: + + {{< highlight bash >}} + curl -fsSL https://packages.redis.io/gpg > /tmp/redis.key + sudo rpm --import /tmp/redis.key + sudo yum install epel-release + sudo yum install redis-server + {{< / highlight >}} + +Redis will not start automatically, nor will it start at boot time. To do this, run the following commands. + +{{< highlight bash >}} +sudo systemctl enable redis-server +sudo systemctl start redis-server +{{< /highlight >}} diff --git a/content/operate/oss_and_stack/install/install-stack/snap.md b/content/operate/oss_and_stack/install/install-stack/snap.md new file mode 100644 index 0000000000..395982f700 --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/snap.md @@ -0,0 +1,38 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition using Snap +linkTitle: Snap +title: Install Redis Community Edition on Linux +weight: 4 +--- + +## Install Redis Community Edition (CE) on Ubuntu Linux using Snap + +To install Redis via snap, run the following commands: + +{{< highlight bash >}} +sudo apt update +sudo apt install redis-tools # this will install `redis-cli` +sudo snap install redis +{{< / highlight >}} + +Redis will start automatically after installation and also at boot time. + +## Connect to Redis CE + +Once Redis is running, you can test it by running `redis-cli`: + +{{< highlight bash >}} +redis-cli +{{< / highlight >}} + +Test the connection with the `ping` command: + +{{< highlight bash >}} +127.0.0.1:6379> PING +PONG +{{< / highlight >}} \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/install-stack/windows.md b/content/operate/oss_and_stack/install/install-stack/windows.md index 723a141023..2382915573 100644 --- a/content/operate/oss_and_stack/install/install-stack/windows.md +++ b/content/operate/oss_and_stack/install/install-stack/windows.md @@ -4,17 +4,18 @@ categories: - operate - stack - oss -description: How to install Redis Stack on Windows +description: How to run Redis Community Edition on Windows linkTitle: Windows -title: Install Redis Stack on Windows -weight: 3 +title: Run Redis Community Edition on Windows using Docker +weight: 7 --- -To install Redis Stack on Windows, you will need to have Docker installed. When Docker is up and running, open Windows PowerShell and follow the instructions described in [Run Redis Stack on Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker" >}}). Then, use Docker to connect with `redis-cli` as explained in that topic. +## Run Redis Community Edition (CE) on Windows using Docker + +To install Redis CE on Windows, you will need to have Docker installed. When Docker is up and running, open Windows PowerShell and follow the instructions described in [Run Redis CE on Docker]({{< relref "/operate/oss_and_stack/install/install-stack/docker" >}}). Then, use Docker to connect with `redis-cli` as explained in that topic. {{% alert title="About using WSL and Ubuntu for Windows " color="warning" %}} -If you attempt to use Windows Subsystem for Linux (WSL) or Ubuntu for Windows to follow [Linux instructions]({{< relref "/operate/oss_and_stack/install/install-stack/linux" >}}), you will get a `systemd` error telling you `System has not been booted with systemd as init system (PID 1). Can't operate.` Do not fret. Just use Docker. +If you attempt to use Windows Subsystem for Linux (WSL) or Ubuntu for Windows to follow [Linux instructions]({{< relref "/operate/oss_and_stack/install/install-stack/apt" >}}), you will get a `systemd` error telling you `System has not been booted with systemd as init system (PID 1). Can't operate.` Do not fret. Just use Docker. _`systemd` is a suite of basic building blocks for a Linux system._ For more information about its function, see [System and Service Manager](https://systemd.io/). This becomes an issue due to the lack of support for Linux workflows on WSL. But, you can test the instructions listed in [Systemd support is now available in WSL!](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/). Let us know how that worked for you. {{% /alert %}} - diff --git a/content/operate/oss_and_stack/management/config.md b/content/operate/oss_and_stack/management/config.md index 0f6a0726ca..418c518d84 100644 --- a/content/operate/oss_and_stack/management/config.md +++ b/content/operate/oss_and_stack/management/config.md @@ -54,7 +54,7 @@ Redis distribution. * The self documented [redis.conf for Redis 2.6](https://raw.githubusercontent.com/redis/redis/2.6/redis.conf). * The self documented [redis.conf for Redis 2.4](https://raw.githubusercontent.com/redis/redis/2.4/redis.conf). -Passing arguments via the command line +Passing arguments using the command line --- You can also pass Redis configuration parameters @@ -64,7 +64,7 @@ as a replica of the instance running at 127.0.0.1 port 6379. ./redis-server --port 6380 --replicaof 127.0.0.1 6379 -The format of the arguments passed via the command line is exactly the same +The format of the arguments passed using the command line is exactly the same as the one used in the redis.conf file, with the exception that the keyword is prefixed with `--`. diff --git a/content/operate/oss_and_stack/management/security/acl.md b/content/operate/oss_and_stack/management/security/acl.md index 4a5c546b7e..75c6a8a81f 100644 --- a/content/operate/oss_and_stack/management/security/acl.md +++ b/content/operate/oss_and_stack/management/security/acl.md @@ -274,52 +274,54 @@ really annoying, so instead we do things like this: > ACL SETUSER antirez on +@all -@dangerous >42a979... ~* -By saying +@all and -@dangerous, we included all the commands and later removed -all the commands that are tagged as dangerous inside the Redis command table. -Note that command categories **never include modules commands** with -the exception of +@all. If you say +@all, all the commands can be executed by -the user, even future commands loaded via the modules system. However if you -use the ACL rule +@read or any other, the modules commands are always -excluded. This is very important because you should just trust the Redis -internal command table. Modules may expose dangerous things and in -the case of an ACL that is just additive, that is, in the form of `+@all -...` -You should be absolutely sure that you'll never include what you did not mean -to. +The above command includes all commands (`+@all`) and then removes all commands tagged as dangerous (`-@dangerous`) inside the Redis command table. +Note that command categories, with the exception of `+@all`, never include module commands. + +If you use `+@all` for a particular user, all commands are available to that user, including commands loaded via the modules system. However, if you use `+@read` or any other, module commands are excluded. This concept is fundamental because you should only trust the Redis +internal command table. Modules may expose dangerous things, and in +the case of an ACL that is just additive, that is, in the form of `+@all -...`, +you should be absolutely sure that you won't include what you did not mean to. The following is a list of command categories and their meanings: * **admin** - Administrative commands. Normal applications will never need to use these. Includes [`REPLICAOF`](/commands/replicaof), [`CONFIG`](/commands/config), [`DEBUG`](/commands/debug), [`SAVE`](/commands/save), [`MONITOR`](/commands/monitor), [`ACL`](/commands/acl), [`SHUTDOWN`](/commands/shutdown), etc. -* **bitmap** - Data type: bitmaps related. +* **bitmap** - Data type: all bitmap related commands. * **blocking** - Potentially blocking the connection until released by another command. +* **bloom** - Data type: all Bloom filter related commands. +* **cms** - Data type: count-min sketch related commands. * **connection** - Commands affecting the connection or other connections. This includes [`AUTH`](/commands/auth), [`SELECT`](/commands/select), [`COMMAND`](/commands/command), [`CLIENT`](/commands/client), [`ECHO`](/commands/echo), [`PING`](/commands/ping), etc. +* **cuckoo** - Data type: all Cuckoo filter related commands. * **dangerous** - Potentially dangerous commands (each should be considered with care for various reasons). This includes [`FLUSHALL`](/commands/flushall), [`MIGRATE`](/commands/migrate), [`RESTORE`](/commands/restore), [`SORT`](/commands/sort), [`KEYS`](/commands/keys), [`CLIENT`](/commands/client), [`DEBUG`](/commands/debug), [`INFO`](/commands/info), [`CONFIG`](/commands/config), [`SAVE`](/commands/save), [`REPLICAOF`](/commands/replicaof), etc. -* **geo** - Data type: geospatial indexes related. -* **hash** - Data type: hashes related. -* **hyperloglog** - Data type: hyperloglog related. -* **fast** - Fast O(1) commands. May loop on the number of arguments, but not the - number of elements in the key. +* **fast** - Fast O(1) commands. May loop on the number of arguments, but not the number of elements in the key. +* **geo** - Data type: all geospatial index related commands. +* **hash** - Data type: all hash related commands. +* **hyperloglog** - Data type: all hyperloglog related commands. +* **json** - Data type: all JSON related commands. * **keyspace** - Writing or reading from keys, databases, or their metadata in a type agnostic way. Includes [`DEL`](/commands/del), [`RESTORE`](/commands/restore), [`DUMP`](/commands/dump), [`RENAME`](/commands/rename), [`EXISTS`](/commands/exists), [`DBSIZE`](/commands/dbsize), [`KEYS`](/commands/keys), [`EXPIRE`](/commands/expire), [`TTL`](/commands/ttl), [`FLUSHALL`](/commands/flushall), etc. Commands that may modify the keyspace, key, or metadata will also have the `write` category. Commands that only read the keyspace, key, or metadata will have the `read` category. -* **list** - Data type: lists related. -* **pubsub** - PubSub-related commands. -* **read** - Reading from keys (values or metadata). Note that commands that don't - interact with keys, will not have either `read` or `write`. +* **list** - Data type: all list related commands. +* **pubsub** - all pubsub related commands. +* **read** - Reading from keys (values or metadata). Note that commands that don't interact with keys, will not have either `read` or `write`. * **scripting** - Scripting related. -* **set** - Data type: sets related. -* **sortedset** - Data type: sorted sets related. +* **search** - All search related commands. Note that indexes can only be created/modified if their key prefixes are a superset of the keys to which a user has access. For example, a user with the key ACL pattern `h:*` can create an index with keys prefixed by `h:*` or `h:p*`, but not keys prefixed by `h*`, `k:*`, or `k*`, because these prefixes may involve keys to which the user has access. +* **set** - Data type: all set related commands. +* **sortedset** - Data type: all sorted set related commands. * **slow** - All commands that are not `fast`. -* **stream** - Data type: streams related. -* **string** - Data type: strings related. +* **stream** - Data type: all stream related commands. +* **string** - Data type: all string related commands. +* **tdigest** - Data type: all t-digest related commands. +* **timeseries** - Data type: all time series related commands. +* **topk** - Data type: all top-k related commands. * **transaction** - [`WATCH`](/commands/watch) / [`MULTI`](/commands/multi) / [`EXEC`](/commands/exec) related commands. -* **write** - Writing to keys (values or metadata). +* **write** - Writing to keys (values or metadata). Note that commands that don't interact with keys, will not have either `read` or `write`. Redis can also show you a list of all categories and the exact commands each category includes using the Redis [`ACL CAT`](/commands/acl-cat) command. It can be used in two forms: @@ -328,43 +330,55 @@ Redis can also show you a list of all categories and the exact commands each cat Examples: - > ACL CAT - 1) "keyspace" - 2) "read" - 3) "write" - 4) "set" - 5) "sortedset" - 6) "list" - 7) "hash" - 8) "string" - 9) "bitmap" - 10) "hyperloglog" - 11) "geo" - 12) "stream" - 13) "pubsub" - 14) "admin" - 15) "fast" - 16) "slow" - 17) "blocking" - 18) "dangerous" - 19) "connection" - 20) "transaction" - 21) "scripting" - -As you can see, so far there are 21 distinct categories. Now let's check what +``` +> ACL CAT + 1) "keyspace" + 2) "read" + 3) "write" + 4) "set" + 5) "sortedset" + 6) "list" + 7) "hash" + 8) "string" + 9) "bitmap" +10) "hyperloglog" +11) "geo" +12) "stream" +13) "pubsub" +14) "admin" +15) "fast" +16) "slow" +17) "blocking" +18) "dangerous" +19) "connection" +20) "transaction" +21) "scripting" +22) "json" +23) "search" +24) "tdigest" +25) "cms" +26) "bloom" +27) "cuckoo" +28) "topk" +29) "timeseries" +``` + +As you can see, so far there are 29 distinct categories. Now let's check what command is part of the *geo* category: - > ACL CAT geo - 1) "geohash" - 2) "georadius_ro" - 3) "georadiusbymember" - 4) "geopos" - 5) "geoadd" - 6) "georadiusbymember_ro" - 7) "geodist" - 8) "georadius" - 9) "geosearch" - 10) "geosearchstore" +``` +> ACL CAT geo +1) "geohash" +2) "georadius_ro" +3) "georadiusbymember" +4) "geopos" +5) "geoadd" +6) "georadiusbymember_ro" +7) "geodist" +8) "georadius" +9) "geosearch" +10) "geosearchstore" +``` Note that commands may be part of multiple categories. For example, an ACL rule like `+@geo -@read` will result in certain geo commands to be @@ -470,19 +484,21 @@ and check the output of [`ACL LIST`](/commands/acl-list) or [`ACL GETUSER`](/com string that looks pseudo random. Here is an example, because in the previous examples, for the sake of brevity, the long hex string was trimmed: - > ACL GETUSER default - 1) "flags" - 2) 1) "on" - 3) "passwords" - 4) 1) "2d9c75273d72b32df726fb545c8a4edc719f0a95a6fd993950b10c474ad9c927" - 5) "commands" - 6) "+@all" - 7) "keys" - 8) "~*" - 9) "channels" - 10) "&*" - 11) "selectors" - 12) (empty array) +``` +> ACL GETUSER default +1) "flags" +2) 1) "on" +3) "passwords" +4) 1) "2d9c75273d72b32df726fb545c8a4edc719f0a95a6fd993950b10c474ad9c927" +5) "commands" +6) "+@all" +7) "keys" +8) "~*" +9) "channels" +10) "&*" +11) "selectors" +12) (empty array) +``` Using SHA256 provides the ability to avoid storing the password in clear text while still allowing for a very fast [`AUTH`](/commands/auth) command, which is a very important diff --git a/content/operate/oss_and_stack/reference/_index.md b/content/operate/oss_and_stack/reference/_index.md index db32b83a1d..32e89099cf 100644 --- a/content/operate/oss_and_stack/reference/_index.md +++ b/content/operate/oss_and_stack/reference/_index.md @@ -1,5 +1,5 @@ --- title: Reference -description: Redis Community Edition and Redis Stack reference documentation +description: Redis Community Edition reference documentation linkTitle: Reference --- \ No newline at end of file diff --git a/content/operate/oss_and_stack/stack-with-enterprise/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/_index.md index aa582a5ac6..a59112d542 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/_index.md @@ -1,5 +1,5 @@ --- -Title: Redis Stack and Redis Enterprise +Title: Redis Community Edition and Redis Enterprise alwaysopen: false categories: - docs @@ -7,10 +7,10 @@ categories: - stack description: null hideListLinks: false -linkTitle: Redis Stack and Redis Enterprise +linkTitle: Redis CE and Redis Enterprise weight: 70 aliases: - /operate/modules --- -[Redis Enterprise Software]({{< relref "/operate/rs" >}}) and [Redis Cloud]({{< relref "/operate/rc" >}}) support all [Redis Stack]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) features, which extend the core Redis feature set. Some of the capabilities Redis Stack provides include querying, indexing, and full-text search and support for JSON, time series, and probabilistic data structures. \ No newline at end of file +[Redis Enterprise Software]({{< relref "/operate/rs" >}}) and [Redis Cloud]({{< relref "/operate/rc" >}}) support all [Redis Community Edition]({{< relref "/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities" >}}) features. Some of the capabilities Redis Community Edition provides include querying, indexing, and full-text search and support for JSON, time series, and probabilistic data structures. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md b/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md index abcf8e3360..0c4f47eb6c 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/bloom/config.md @@ -33,8 +33,4 @@ To change the RedisBloom configuration using the Redis Software Cluster Manager ## Configuration settings -| Setting | Redis
Enterprise | Redis
Cloud | Notes | -|:--------|:----------------------|:-----------------|:------| -| [CF_MAX_EXPANSIONS]({{< relref "/develop/data-types/probabilistic/" >}}configuration/#cf_max_expansions) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 32 | -| [ERROR_RATE]({{< relref "/develop/data-types/probabilistic/" >}}configuration/#error_rate) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 0.01 | -| [INITIAL_SIZE]({{< relref "/develop/data-types/probabilistic/" >}}configuration/#initial_size) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 100 | +See [configuration parameters]({{< relref "/develop/data-types/probabilistic/configuration" >}}) in the Develop section for parameter details and compatibility with Redis Software and Redis Cloud. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/_index.md index 1ee6b4e77f..7f7552cf34 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/deprecated-features/_index.md @@ -1,5 +1,5 @@ --- -Title: Deprecated Redis Stack features and modules +Title: Deprecated Redis Community Edition features and modules alwaysopen: false categories: - docs diff --git a/content/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities.md b/content/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities.md index 3bdaa696c2..49708ed9fc 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/enterprise-capabilities.md @@ -1,21 +1,21 @@ --- -Title: Redis Enterprise and Redis Stack feature compatibility +Title: Redis Enterprise and Redis Community Edition feature compatibility alwaysopen: false categories: - docs - operate - stack -description: Describes the Redis Enterprise features supported by each Redis Stack +description: Describes the Redis Enterprise features supported by each Redis Community Edition feature. linkTitle: Enterprise feature compatibility weight: 8 --- -This article describes compatibility between Redis Enterprise features and Redis Stack features. Version numbers indicate the minimum module version required for feature support. +This article describes compatibility between Redis Enterprise features and Redis Community Edition (CE) features. Version numbers indicate the minimum module version required for feature support. -## Supported Redis Stack features +## Supported Redis CE features -The following table shows which Redis Stack features are supported by Redis Enterprise Software and Redis Cloud. +The following table shows which Redis CE features are supported by Redis Enterprise Software and Redis Cloud. | Feature | Redis Enterprise
Software | Redis Enterprise
Cloud | |:-------|:-------------------------|:-----------------------| @@ -27,9 +27,10 @@ The following table shows which Redis Stack features are supported by Redis Ente | [Triggers and functions]({{< relref "/operate/oss_and_stack/stack-with-enterprise/deprecated-features/triggers-and-functions/" >}}) | ⚠️ Deprecated | ⚠️ Deprecated | | [Graph]({{< relref "/operate/oss_and_stack/stack-with-enterprise/deprecated-features/graph" >}}) | ⚠️ Deprecated | ⚠️ Deprecated | + ## Feature compatibility -The following tables show Redis Enterprise feature support for each non-deprecated Redis Stack feature. +The following tables show Redis Enterprise feature support for each Redis CE feature. Version numbers indicate when the feature was first supported. If you're using an earlier version than what's shown in the table, the feature is not supported. @@ -57,9 +58,9 @@ For details about individual features, see the corresponding documentation. [^3]: You cannot use search and query with the [OSS Cluster API]({{< relref "/operate/rs/databases/configure/oss-cluster-api" >}}). -[^4]: You currently cannot combine Auto Tiering with Redis Stack features in Redis Cloud. +[^4]: You currently cannot combine Auto Tiering with Redis CE features in Redis Cloud. -[^5]: With the exception of JSON, you currently cannot combine Active-Active with Redis Stack features in Redis Cloud. +[^5]: With the exception of JSON, you currently cannot combine Active-Active with Redis CE features in Redis Cloud. [^6]: Although time series are compatible with Auto Tiering, the entire series either lives in RAM or on flash. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/json/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/json/_index.md index a9c9f39d25..07854596c2 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/json/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/json/_index.md @@ -5,14 +5,14 @@ categories: - docs - operate - stack -description: Redis Stack adds support for JSON to Redis databases. +description: Redis Community Edition adds support for JSON to Redis databases. hideListLinks: true linkTitle: JSON toc: 'true' weight: 30 --- -Redis Stack adds support for the [JSON data structure](http://www.json.org/) to Redis databases. +Redis Community Edition (CE) adds support for the [JSON data structure](http://www.json.org/) to Redis databases. Applications developed with the [source available version of RedisJSON](https://github.com/RedisJSON/RedisJSON) are 100% compatible with Redis Enterprise databases with JSON enabled. @@ -21,7 +21,7 @@ compatible with Redis Enterprise databases with JSON enabled. [Paths]({{< relref "/develop/data-types/json/path" >}}) let you traverse the structure of a JSON document, starting from the root, and interact only with the data you want. You can also use paths to perform operations on specific JSON elements. -Since there is no standard for JSON path syntax, Redis Stack implements its own. +Since there is no standard for JSON path syntax, Redis CE implements its own. ### JSONPath syntax diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/_index.md index 951c593804..76b0050fab 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/_index.md @@ -1,16 +1,16 @@ --- -Title: Redis Stack and modules release notes +Title: Redis Community Edition and modules release notes alwaysopen: false categories: - docs - operate - stack -description: Release notes for Redis Community Edition, Redis Stack, and modules +description: Redis Community Edition and modules release notes hideListLinks: true linkTitle: Release notes weight: 99 --- -See the following release notes for new features, enhancements, and other changes to Redis Stack capabilities. +See the following release notes for new features, enhancements, and other changes to Redis Community Edition capabilities. {{}} \ No newline at end of file diff --git a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-1.4-release-notes.md b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-1.4-release-notes.md index d214f63e00..5424319930 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-1.4-release-notes.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/release-notes/redisearch/redisearch-1.4-release-notes.md @@ -382,7 +382,7 @@ redis-server --loadmodule ./redisearch.so GC_POLICY FORK ### Runtime configuration -RediSearch's [configuration]({{}}) is applied via arguments passed to the module at load time. This release introduces the new `FT.CONFIG` command that allows to retrieve the current configuration as well as change it during runtime. +RediSearch's [configuration]({{}}) is applied via arguments passed to the module at load time. This release introduces the new `FT.CONFIG` command that allows to retrieve the current configuration as well as change it during runtime. ### Unlimited autocomplete results diff --git a/content/operate/oss_and_stack/stack-with-enterprise/search/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/search/_index.md index 4d46385187..87845ca54e 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/search/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/search/_index.md @@ -49,7 +49,7 @@ For full-text searches, you can customize the field queries and ranking of the s When querying, you can use multiple predicates that query text, numeric, and geospatial fields in one query. You can also sort by a specific field and limit the results with an offset to produce customized results pages. -Redis Stack supports [over 15 natural languages]({{< relref "/develop/interact/search-and-query/advanced-concepts/stemming" >}}) for stemming and includes auto-complete engines with specific commands that can provide real-time [interactive search suggestions]({{< relref "commands/ft.sugadd" >}}). +Redis Community Edition supports [over 15 natural languages]({{< relref "/develop/interact/search-and-query/advanced-concepts/stemming" >}}) for stemming and includes auto-complete engines with specific commands that can provide real-time [interactive search suggestions]({{< relref "/commands/ft.sugadd" >}}). ## Search and query Active-Active databases diff --git a/content/operate/oss_and_stack/stack-with-enterprise/search/config.md b/content/operate/oss_and_stack/stack-with-enterprise/search/config.md index d3035df8f0..9af82824c0 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/search/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/search/config.md @@ -66,29 +66,4 @@ For Redis Enterprise Software, use one of the following methods: ## Configuration settings -| Setting | Redis
Enterprise | Redis
Cloud | Notes | -|:--------|:----------------------|:-----------------|:------| -| [CONCURRENT_WRITE_MODE]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: Not enabled | -| [CURSOR_MAX_IDLE]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 300000 | -| CURSOR_READ_SIZE | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 1000 | -| [DEFAULT_DIALECT]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 1 | -| [EXTLOAD]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: None | -| [FORK_GC_CLEAN_THRESHOLD]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 100 | -| [FORK_GC_RETRY_INTERVAL]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 5 | -| [FORK_GC_RUN_INTERVAL]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 30 | -| [FRISOINI]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: Not set | -| [GC_POLICY]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: FORK | -| [GC_SCANSIZE]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 100 | -| [MAXAGGREGATERESULTS]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Redis Enterprise default: Unlimited

Redis Cloud defaults:
• Flexible & Annual: Unlimited
• Free & Fixed: 10000
| -| [MAXDOCTABLESIZE]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 1000000 | -| [MAXPREFIXEXPANSIONS]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 200 | -| [MAXSEARCHRESULTS]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Redis Enterprise default: 1000000

Redis Cloud defaults:
• Flexible & Annual: 1000000
• Free & Fixed: 10000
| -| [MINPREFIX]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 2 | -| [MINSTEMLEN]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 2 | -| [NOGC]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: Not set | -| [ON_TIMEOUT]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: RETURN | -| [OSS_GLOBAL_PASSWORD]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ❌ Flexible & Annual
❌ Free & Fixed | | -| [PARTIAL_INDEXED_DOCS]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: 0 | -| [TIMEOUT]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Redis Enterprise default: 500

Redis Cloud defaults:
• Flexible & Annual: 500
• Free & Fixed: 100
| -| UNION_ITERATOR_HEAP| ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed -| [UPGRADE_INDEX]({{< relref "/develop/interact/search-and-query/basic-constructs/configuration-parameters" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: No default index name | +See [configuration parameters]({{< relref "/develop/interact/search-and-query/administration/configuration" >}}) in the Develop section for parameter details and compatibility with Redis Software and Redis Cloud. diff --git a/content/operate/oss_and_stack/stack-with-enterprise/stack-quickstart.md b/content/operate/oss_and_stack/stack-with-enterprise/stack-quickstart.md index 2250c21603..66deff0a47 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/stack-quickstart.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/stack-quickstart.md @@ -6,10 +6,10 @@ categories: - stack description: null linkTitle: Quick start -title: Redis Stack quick start +title: Redis Community Edition quick start weight: 1 --- -To quickly set up a database with Redis Stack features, +To quickly set up a database with Redis Stack (Redis Community Edition) features, you can sign up for a free [Redis Cloud](https://cloud.redis.io/#/sign-up) subscription and create a Redis Stack database. Alternatively, you can use one of these methods: @@ -77,9 +77,9 @@ After creating the database, you can view its **Configuration** settings. You wi With this information, you can connect to your database with the [`redis-cli`]({{< relref "/operate/rs/references/cli-utilities/redis-cli" >}}) command-line tool, an application, or [Redis Insight](https://redislabs.com/redisinsight/). -## Try Redis Stack features +## Try Redis Community Edition features -To try out Redis Stack features, follow the examples provided by the corresponding guides: +To try out Redis Community Edition features, follow the examples provided by the corresponding guides: - [Redis Query Engine quick start]({{< relref "/develop/get-started/document-database" >}}) - [JSON quick start]({{< relref "/develop/data-types/json/" >}}#use-redisjson) diff --git a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/_index.md index 8281fe758c..ef4b7de176 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/_index.md @@ -10,7 +10,7 @@ hideListLinks: true linkTitle: Time series weight: 50 --- -You can manage time series data in Redis Enterprise with Redis Stack. +You can manage time series data in Redis Enterprise with Redis Community Edition (CE). ## Features @@ -30,7 +30,7 @@ Each sample is a tuple of the time and the value of 128 bits, ## Time series capabilities -Redis Stack provides a new data type that uses chunks of memory of fixed size for time series samples, indexed by the same Radix Tree implementation as Redis streams. With streams, you can create [a capped stream]({{< relref "develop/data-types/streams/#capped-streams" >}}), effectively limiting the number of messages by count. For time series, you can apply a retention policy in milliseconds. This is better for time series use cases, because they are typically interested in the data during a given time window, rather than a fixed number of samples. +Redis CE provides a new data type that uses chunks of memory of fixed size for time series samples, indexed by the same Radix Tree implementation as Redis streams. With streams, you can create [a capped stream]({{< relref "/develop/data-types/streams/#capped-streams" >}}), effectively limiting the number of messages by count. For time series, you can apply a retention policy in milliseconds. This is better for time series use cases, because they are typically interested in the data during a given time window, rather than a fixed number of samples. ### Downsampling/compaction @@ -78,7 +78,7 @@ Here's an example of [aggregation]({{< relref "develop/data-types/timeseries/qui ### Integrations -Redis Stack comes with several integrations into existing time series tools. One such integration is our [RedisTimeSeries adapter](https://github.com/RedisTimeSeries/prometheus-redistimeseries-adapter) for [Prometheus](https://prometheus.io/), which keeps all your monitoring metrics inside time series while leveraging the entire [Prometheus ecosystem](https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations). +Redis CE comes with several integrations into existing time series tools. One such integration is our [RedisTimeSeries adapter](https://github.com/RedisTimeSeries/prometheus-redistimeseries-adapter) for [Prometheus](https://prometheus.io/), which keeps all your monitoring metrics inside time series while leveraging the entire [Prometheus ecosystem](https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations). {{< image filename="/images/rs/TimeSeries-integrations.png" >}} diff --git a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md index 35842df733..0388a629e5 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md @@ -33,13 +33,4 @@ To change RedisTimeSeries configuration using the Redis Software Cluster Manager ## Configuration settings -| Setting | Redis
Enterprise | Redis
Cloud | Notes | -|:--------|:----------------------|:-----------------|:------| -| [CHUNK_SIZE_BYTES]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `4096` | -| [COMPACTION_POLICY]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: No default compaction rules | -| [DUPLICATE_POLICY]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `BLOCK` | -| [ENCODING]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `COMPRESSED` | -| [NUM_THREADS]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual\*
❌ Free & Fixed | \* Updates automatically when you change your plan.

Redis Enterprise default: Set by plan

Redis Cloud defaults:
• Flexible & Annual: Set by plan
• Free & Fixed: `1`
| -| [RETENTION_POLICY]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `0` | -| [IGNORE_MAX_TIME_DIFF]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `0` | -| [IGNORE_MAX_VAL_DIFF]({{< relref "/develop/data-types/timeseries/configuration" >}}) | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | Default: `0` | +See [configuration parameters]({{< relref "/develop/data-types/timeseries/configuration" >}}) in the Develop section for parameter details and compatibility with Redis Software and Redis Cloud. diff --git a/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md b/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md index 67ef3d97a4..f1d70ee04b 100644 --- a/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md +++ b/content/operate/rs/7.4/references/cli-utilities/redis-cli/_index.md @@ -24,7 +24,7 @@ When you install Redis Enterprise Software or Redis Community Edition, it also i To learn how to install Redis and `redis-cli`, see the following installation guides: -- [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-redis/" >}}) +- [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) - [Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) diff --git a/content/operate/rs/references/cli-utilities/redis-cli/_index.md b/content/operate/rs/references/cli-utilities/redis-cli/_index.md index fec5a4eee4..a1372f6fa1 100644 --- a/content/operate/rs/references/cli-utilities/redis-cli/_index.md +++ b/content/operate/rs/references/cli-utilities/redis-cli/_index.md @@ -23,7 +23,7 @@ When you install Redis Enterprise Software or Redis Community Edition, it also i To learn how to install Redis and `redis-cli`, see the following installation guides: -- [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-redis/" >}}) +- [Redis Community Edition]({{< relref "/operate/oss_and_stack/install/install-stack/" >}}) - [Redis Enterprise Software]({{< relref "/operate/rs/installing-upgrading/quickstarts/redis-enterprise-software-quickstart" >}}) diff --git a/data/resp2_replies.json b/data/resp2_replies.json index 07a7cc52ed..ac37ede34e 100644 --- a/data/resp2_replies.json +++ b/data/resp2_replies.json @@ -573,7 +573,23 @@ "* [Nil reply](../../develop/reference/protocol-spec#bulk-strings): If the field is not present in the hash or key does not exist." ], "HGETALL": [ - "[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values stored in the hash, or an empty list when key does not exist." + "[Array reply](../../develop/reference/protocol-spec#arrays): a list of fields and their values, or an empty list when key does not exist." + ], + "HGETDEL": [ + "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." + ], + "HGETEX": [ + "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", + " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.", + " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds." + ], + "HGETDEL": [ + "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." + ], + "HGETEX": [ + "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", + " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.", + " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds." ], "HINCRBY": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation." @@ -648,6 +664,11 @@ "HSET": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added." ], + "HSETEX": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.", + "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset." + ], "HSETNX": [ "One of the following:", "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.", @@ -1183,6 +1204,66 @@ "UNWATCH": [ "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." ], + "VADD": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): 1 if key was added; 0 if key was not added.", + "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed." + ], + "VCARD": [ + "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set." + ], + "VDIM": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements.", + "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist." + ], + "VEMB": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays): of real numbers as [bulk strings](../../develop/reference/protocol-spec#bulk-strings), representing the vector.", + "* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements:", + " 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`.", + " 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data:", + " * 4-byte floats for fp32", + " * A bitmap for binary quantization", + " * A byte array for q8", + " 1. The L2 norm, as a [simple string](../../develop/reference/protocol-spec#simple-strings), of the vector before normalization.", + " 1. (Only for q8): The quantization range as a [simple string](../../develop/reference/protocol-spec#simple-strings). Multiply this by integer components to recover normalized values." + ], + "VGETATTR": [ + "One of the following:", + "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s).", + "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown key or element, or when no attributes exist for the given key/element pair." + ], + "VINFO": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) (null array reply) for unknown key." + ], + "VLINKS": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings); interleved with scores when using the WITHSCORES option.", + "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys and/or elements." + ], + "VRANDMEMBER": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of count random elements as [strings](../../develop/reference/protocol-spec#simple-strings).", + "* [Bulk string reply](../../develop/reference/protocol-spec#bulk-strings) (null bulk string) for unknown keys.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified." + ], + "VREM": [ + "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if either element or key do not exist; 1 if the element was removed." + ], + "VSETATTR": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): 0 if either the key or element does not exist; 1 if the attributes were successfully added to the element.", + "* [Simple error reply](develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string." + ], + "VSIM": [ + "One of the following:", + "* [Simple error reply](develop/reference/protocol-spec/#simple-errors) for unknown element.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements; juxtaposed with scores when used with the WITHSCORES option." + ], "WAIT": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the command returns the number of replicas reached by all the writes performed in the context of the current connection." ], diff --git a/data/resp3_replies.json b/data/resp3_replies.json index 0a3692e4f5..650108d53d 100644 --- a/data/resp3_replies.json +++ b/data/resp3_replies.json @@ -573,7 +573,23 @@ "* [Null reply](../../develop/reference/protocol-spec#nulls): If the field is not present in the hash or key does not exist." ], "HGETALL": [ - "[Map reply](../../develop/reference/protocol-spec#maps): a map of fields and their values stored in the hash, or an empty list when key does not exist." + "[Map reply](../../develop/reference/protocol-spec#maps): a map of fields and their values, or an empty list when key does not exist." + ], + "HGETDEL": [ + "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." + ], + "HGETEX": [ + "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", + " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.", + " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds." + ], + "HGETDEL": [ + "[Array reply](../../develop/reference/protocol-spec#arrays): a list of deleted fields and their values or `nil` for fields that do not exist." + ], + "HGETEX": [ + "* [Array reply](../../develop/reference/protocol-spec#arrays). For each field:", + " - [Integer reply](../../develop/reference/protocol-spec#integers): `-2` if no such field exists in the provided hash key, or the provided key does not exist, or if the field exists but has no associated expiration set.", + " - [Integer reply](../../develop/reference/protocol-spec#integers): the expiration in seconds." ], "HINCRBY": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the value of the field after the increment operation." @@ -648,6 +664,11 @@ "HSET": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the number of fields that were added." ], + "HSETEX": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if no fields were set.", + "* [Integer reply](../../develop/reference/protocol-spec#integers): `1` if all the fields wereset." + ], "HSETNX": [ "One of the following:", "* [Integer reply](../../develop/reference/protocol-spec#integers): `0` if the field already exists in the hash and no operation was performed.", @@ -1248,6 +1269,68 @@ "UNWATCH": [ "[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`." ], + "VADD": [ + "One of the following:", + "* [Boolean reply](../../develop/reference/protocol-spec#booleans): true if key was added; false if key was not added.", + "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the command was malformed." + ], + "VCARD": [ + "[Integer reply](../../develop/reference/protocol-spec#integers): 0 if the key doesn't exist or the number of elements contained in the vector set." + ], + "VDIM": [ + "One of the following:", + "* [Integer reply](../../develop/reference/protocol-spec#integers): the number of vector set elements.", + "* [Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the key does not exist." + ], + "VEMB": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays): of [doubles](../../develop/reference/protocol-spec#doubles), representing the vector.", + "* [Array reply](../../develop/reference/protocol-spec#arrays): consisting of the following elements:", + " 1. The quantization type as a [simple string](../../develop/reference/protocol-spec#simple-strings): `fp32`, `bin`, or `q8`.", + " 1. A [bulk string](../../develop/reference/protocol-spec#bulk-strings) blob with the following raw data:", + " * 4-byte floats for fp32", + " * A bitmap for binary quantization", + " * A byte array for q8", + " 1. The [double](../../develop/reference/protocol-spec#doubles) L2 norm of the vector before normalization.", + " 1. (Only for q8): The quantization range as a [double](../../develop/reference/protocol-spec#doubles). Multiply this by integer components to recover normalized values." + ], + "VGETATTR": [ + "One of the following:", + "* [Simple string reply](../../develop/reference/protocol-spec#simple-strings) containing the JSON attribute(s).", + "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key or element, or when no attributes exist for the given key/element pair." + ], + "VINFO": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing metadata and internal details about a vector set, including size, dimensions, quantization type, and graph structure.", + "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown key." + ], + "VLINKS": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of adjacent elements as [strings](../../develop/reference/protocol-spec#simple-strings) when used without the WITHSCORES option.", + "* [Map reply](../../develop/reference/protocol-spec#maps) containing the names of adjecent elements as [strings](../../develop/reference/protocol-spec#simple-strings), together with their scores as [doubles](../../develop/reference/protocol-spec#doubles) when used with the WITHSCORES option.", + "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys and/or elements." + ], + "VRANDMEMBER": [ + "One of the following:", + "* [Array reply](../../develop/reference/protocol-spec#arrays) containing the names of *count* random elements as [strings](../../develop/reference/protocol-spec#simple-strings).", + "* [Null reply](../../develop/reference/protocol-spec#nulls) for unknown keys.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown keys when a count is specified." + ], + "VREM": [ + "[Boolean reply](../../develop/reference/protocol-spec#booleans): false if either element or key do not exist; true if the element was removed." + ], + "VSETATTR": [ + "One of the following:", + "* [Boolean reply](../../develop/reference/protocol-spec#booleans): false if either the key or element does not exist; true if the attributes were successfully added to the element.", + "* [Simple error reply](develop/reference/protocol-spec/#simple-errors) for improperly specified attribute string." + ], + "VSIM": [ + "One of the following:", + "* [Simple error reply](develop/reference/protocol-spec/#simple-errors) for unknown element.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) (empty array) for unknown key.", + "* [Array reply](../../develop/reference/protocol-spec#arrays) with matching elements.", + "* [Map reply](../../develop/reference/protocol-spec#maps) with matching elements and [double](../../develop/reference/protocol-spec#doubles) scores when used with the WITHSCORES option." + ], "WAIT": [ "[Integer reply](../../develop/reference/protocol-spec#integers): the number of replicas reached by all the writes performed in the context of the current connection." ], diff --git a/layouts/commands/list.html b/layouts/commands/list.html index 936e62a31c..e19ce379e1 100644 --- a/layouts/commands/list.html +++ b/layouts/commands/list.html @@ -29,35 +29,32 @@

Commands

{{ $id }} {{ end */}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/layouts/commands/single.html b/layouts/commands/single.html index 2963800351..903bac8bec 100644 --- a/layouts/commands/single.html +++ b/layouts/commands/single.html @@ -45,12 +45,11 @@

{{ if not $isModule }}
Available since:
-
{{ .Params.since }}
+
Redis CE {{ .Params.since }}
{{ else }}
Available in:
- Redis Stack / - {{ .Params.module }} {{ .Params.since }} + Redis CE / {{ .Params.module }} {{ .Params.since }}
{{ end }}
Time complexity:
diff --git a/layouts/operate/list.html b/layouts/operate/list.html index ffaeac96da..93ce567998 100644 --- a/layouts/operate/list.html +++ b/layouts/operate/list.html @@ -9,9 +9,6 @@ {{ partial "breadcrumbs" . }}

- {{ if and (isset .Params "stack") (eq .Params.stack true)}} - {{ partial "icons/logo-stack.html" (dict "context" . "class" "stack-logo-inline") }} - {{ end }} {{ .Title }}

@@ -23,7 +20,7 @@

{{ $visibleCategories := slice }} {{ range .Params.categories }} - {{ if not (in (slice "docs" "operate" "integrate" "develop") .) }} + {{ if not (in (slice "docs" "operate" "integrate" "develop" "stack") .) }} {{ $visibleCategories = $visibleCategories | append (slice .) }} {{ end }} {{ end }} @@ -42,9 +39,6 @@

{{ else if eq $element "oss" }} {{ $displayName = "Redis Community Edition" }} {{ $color = "#C795E3" }} - {{ else if eq $element "stack" }} - {{ $displayName = "Redis Stack" }} - {{ $color = "#49859C" }} {{ else if eq $element "redisinsight" }} {{ $displayName = "Redis Insight" }} {{ $color = "#FD4439" }} diff --git a/layouts/operate/single.html b/layouts/operate/single.html index a3cc707839..6456860bf2 100644 --- a/layouts/operate/single.html +++ b/layouts/operate/single.html @@ -8,11 +8,7 @@
{{ partial "breadcrumbs" . }}
-

- {{ if and (isset .Params "stack") (eq .Params.stack true)}} - {{ partial "icons/logo-stack.html" (dict "context" . "class" "stack-logo-inline") }} - {{ end }} - {{ .Title }}

+

{{ .Title }}

{{ with .Params.description }}

{{ . | markdownify }}

{{ end }} {{ if .Params.categories }}
@@ -21,7 +17,7 @@

{{ $visibleCategories := slice }} {{ range .Params.categories }} - {{ if not (in (slice "docs" "operate" "integrate" "develop") .) }} + {{ if not (in (slice "docs" "operate" "integrate" "develop" "stack") .) }} {{ $visibleCategories = $visibleCategories | append (slice .) }} {{ end }} {{ end }} @@ -40,9 +36,6 @@

{{ else if eq $element "oss" }} {{ $displayName = "Redis Community Edition" }} {{ $color = "#C795E3" }} - {{ else if eq $element "stack" }} - {{ $displayName = "Redis Stack" }} - {{ $color = "#49859C" }} {{ else if eq $element "redisinsight" }} {{ $displayName = "Redis Insight" }} {{ $color = "#FD4439" }} diff --git a/layouts/partials/docs-nav-int.html b/layouts/partials/docs-nav-int.html index ef22bfd2f9..0c2131a663 100644 --- a/layouts/partials/docs-nav-int.html +++ b/layouts/partials/docs-nav-int.html @@ -15,9 +15,6 @@
  • {{ $s.LinkTitle }} - {{ if and (isset $s.Params "stack") (eq $s.Params.stack true)}} - {{ partial "icons/logo-stack.html" (dict "context" . "class" "stack-logo-inline") }} - {{ end }} {{ if and $ulNr $withChild }} {{ if or $active $activePath }}