From 643855cdde79e9cb976a28abe791466b02990a1b Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 18 Oct 2024 08:33:02 -0700 Subject: [PATCH 01/32] Edits for CE 8.0 --- content/develop/connect/clients/_index.md | 4 ++-- layouts/home.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/develop/connect/clients/_index.md b/content/develop/connect/clients/_index.md index 23ecb64edc..db771ccb26 100644 --- a/content/develop/connect/clients/_index.md +++ b/content/develop/connect/clients/_index.md @@ -47,8 +47,8 @@ Redis does not support 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/connect/cli" >}}) and [Redis Insight]({{< relref "/develop/connect/insight" >}}) tools. diff --git a/layouts/home.html b/layouts/home.html index c83fcd5524..2672d0d696 100644 --- a/layouts/home.html +++ b/layouts/home.html @@ -127,8 +127,8 @@

Learn

Explore

{{ partial "docs-section.html" (dict - "Title" "Redis and Stack" - "Description" "Redis Stack extends Redis with modern data models and processing engines." + "Title" "Redis Community Edition" + "Description" "Redis Community Edition replaces Redis Stack and includes modern data models and processing engines." "ButtonLink" "./operate/oss_and_stack/" "ButtonLabel" "Read more" "LinksLeftTitle" "Learn more" From 5609631ee0b592544bfc92803f11c090058f4182 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 18 Oct 2024 12:44:53 -0700 Subject: [PATCH 02/32] More edits for CE 8.0 --- content/develop/connect/clients/dotnet.md | 6 +- content/develop/connect/clients/go.md | 5 +- content/develop/connect/clients/java/jedis.md | 2 +- .../develop/connect/clients/java/lettuce.md | 2 +- content/develop/connect/clients/nodejs.md | 2 +- .../connect/clients/om-clients/_index.md | 4 +- .../connect/clients/python/redis-py.md | 4 +- content/develop/connect/insight/_index.md | 10 ++-- content/develop/data-types/_index.md | 6 +- content/develop/data-types/json/_index.md | 8 +-- .../develop/data-types/json/indexing_JSON.md | 2 +- .../data-types/json/performance/_index.md | 2 +- content/develop/data-types/json/use_cases.md | 2 +- .../data-types/probabilistic/_index.md | 6 +- .../data-types/probabilistic/bloom-filter.md | 10 ++-- .../probabilistic/count-min-sketch.md | 2 +- .../data-types/probabilistic/cuckoo-filter.md | 2 +- .../data-types/probabilistic/t-digest.md | 2 +- .../develop/data-types/probabilistic/top-k.md | 4 +- .../develop/data-types/timeseries/_index.md | 6 +- .../data-types/timeseries/quickstart.md | 8 +-- content/develop/get-started/data-store.md | 2 +- .../develop/get-started/document-database.md | 12 ++-- .../develop/get-started/vector-database.md | 10 ++-- .../interact/search-and-query/_index.md | 10 ++-- .../search-and-query/administration/design.md | 6 +- .../administration/overview.md | 56 +++++++++---------- .../advanced-concepts/_index.md | 6 +- .../advanced-concepts/aggregations.md | 4 +- .../advanced-concepts/chinese.md | 4 +- .../advanced-concepts/dialects.md | 4 +- .../advanced-concepts/escaping.md | 2 +- .../advanced-concepts/highlight.md | 6 +- .../advanced-concepts/phonetic_matching.md | 4 +- .../advanced-concepts/scoring.md | 4 +- .../advanced-concepts/stemming.md | 2 +- .../advanced-concepts/stopwords.md | 2 +- .../advanced-concepts/synonyms.md | 4 +- .../basic-constructs/_index.md | 4 +- .../configuration-parameters.md | 18 +++--- .../field-and-type-options.md | 6 +- .../search-and-query/deprecated/payloads.md | 2 +- .../search-and-query/indexing/_index.md | 13 +---- .../query-use-cases/_index.md | 24 ++++---- .../interact/search-and-query/query/_index.md | 4 +- .../search-and-query/query/geo-spatial.md | 4 +- .../search-and-query/query/vector-search.md | 2 +- 47 files changed, 143 insertions(+), 167 deletions(-) diff --git a/content/develop/connect/clients/dotnet.md b/content/develop/connect/clients/dotnet.md index d007f8ffaa..295e9b9f91 100644 --- a/content/develop/connect/clients/dotnet.md +++ b/content/develop/connect/clients/dotnet.md @@ -19,7 +19,7 @@ weight: 2 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 server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition installation instructions. You can also access Redis with an object-mapping client interface. See [Redis OM for .NET]({{< relref "/integrate/redisom-for-net" >}}) @@ -70,7 +70,7 @@ Console.WriteLine(String.Join("; ", hashFields)); // name: John; surname: Smith; company: Redis; age: 29 ``` -To access Redis Stack capabilities, use the appropriate interface like this: +To access the advanced data structures capability of Redis Community Edition, use the appropriate interface like this: ``` IBloomCommands bf = db.BF(); @@ -190,7 +190,7 @@ for more information. This example shows how to convert Redis search results to JSON format using `NRedisStack`. -Make sure that you have Redis Stack and `NRedisStack` installed. +Make sure that you have Redis Community Edition 8.x and `NRedisStack` installed. Import dependencies and connect to the Redis server: diff --git a/content/develop/connect/clients/go.md b/content/develop/connect/clients/go.md index 9e65e4dac8..5e0e990d19 100644 --- a/content/develop/connect/clients/go.md +++ b/content/develop/connect/clients/go.md @@ -18,9 +18,8 @@ weight: 5 [`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. -See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis installation +`go-redis` requires a running Redis server. +See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition installation instructions. ## Install diff --git a/content/develop/connect/clients/java/jedis.md b/content/develop/connect/clients/java/jedis.md index cd8c76e9ad..bb77360c23 100644 --- a/content/develop/connect/clients/java/jedis.md +++ b/content/develop/connect/clients/java/jedis.md @@ -21,7 +21,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 server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition installation instructions. ## Install diff --git a/content/develop/connect/clients/java/lettuce.md b/content/develop/connect/clients/java/lettuce.md index 315a89a72e..9198911615 100644 --- a/content/develop/connect/clients/java/lettuce.md +++ b/content/develop/connect/clients/java/lettuce.md @@ -23,7 +23,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 server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition installation instructions. ## Install diff --git a/content/develop/connect/clients/nodejs.md b/content/develop/connect/clients/nodejs.md index b5704fc752..f9046fb00a 100644 --- a/content/develop/connect/clients/nodejs.md +++ b/content/develop/connect/clients/nodejs.md @@ -19,7 +19,7 @@ weight: 3 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 server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition 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/connect/clients/om-clients/_index.md b/content/develop/connect/clients/om-clients/_index.md index 8a762ed4df..6559bca96d 100644 --- a/content/develop/connect/clients/om-clients/_index.md +++ b/content/develop/connect/clients/om-clients/_index.md @@ -9,14 +9,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: 6 --- -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/connect/clients/python/redis-py.md b/content/develop/connect/clients/python/redis-py.md index 340a741cfa..cabe0eac4c 100644 --- a/content/develop/connect/clients/python/redis-py.md +++ b/content/develop/connect/clients/python/redis-py.md @@ -19,7 +19,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 server. See [Getting started]({{< relref "/operate/oss_and_stack/install/" >}}) for Redis Community Edition installation instructions. You can also access Redis with an object-mapping client interface. See [RedisOM for Python]({{< relref "/integrate/redisom-for-python" >}}) @@ -268,7 +268,7 @@ pool.close() ## Example: Indexing and querying JSON documents -Make sure that you have Redis Stack and `redis-py` installed. Import dependencies: +Make sure that you have Redis Community Edition 8.x and `redis-py` installed. Import dependencies: ```python import redis diff --git a/content/develop/connect/insight/_index.md b/content/develop/connect/insight/_index.md index e394a55261..f198425512 100644 --- a/content/develop/connect/insight/_index.md +++ b/content/develop/connect/insight/_index.md @@ -20,7 +20,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 @@ -32,7 +32,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. @@ -93,8 +93,8 @@ The CLI is accessible at any time within the application. ### Workbench Advanced command line interface with intelligent command auto-complete and complex data visualizations. -* 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 features using the built-in guides. +* Command auto-complete support for all features in Redis. * Visualizations of your indexes, queries, and aggregations. * Visualizations of your [time series]({{< relref "/develop/data-types/timeseries/" >}}) data. @@ -118,7 +118,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/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 9d91dbd386..14a9be5615 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/_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 10146bdab9..c82a85bb76 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 element 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 of the elements in the set, Bloom Filters store only the elements' hashed representation, 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/count-min-sketch.md b/content/develop/data-types/probabilistic/count-min-sketch.md index 8260affb60..150f48f9b1 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 a5aa558492..95a4cdf0c4 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 e87d72150b..11dca8550d 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 0b9bed45f2..0c0d03c05d 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/quickstart.md b/content/develop/data-types/timeseries/quickstart.md index 47c185505c..8cf1435f3a 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/get-started/data-store.md b/content/develop/get-started/data-store.md index 2315809cc5..4aee38688e 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" >}}) \ No newline at end of file diff --git a/content/develop/get-started/document-database.md b/content/develop/get-started/document-database.md index c128b83e04..0a1a7846aa 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 [connection section]({{< relref "/develop/connect" >}}). 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 database. You can find further details about the connection options in this documentation site's [connection section]({{< relref "/develop/connect" >}}). The following example shows how to connect to a Redis 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]({{< baseurl >}}/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,6 +173,6 @@ 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 cfd739a57c..61294fcaf2 100644 --- a/content/develop/get-started/vector-database.md +++ b/content/develop/get-started/vector-database.md @@ -35,7 +35,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 @@ -50,11 +50,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 @@ -76,7 +74,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 72f9373251..bb2f5f3a75 100644 --- a/content/develop/interact/search-and-query/_index.md +++ b/content/develop/interact/search-and-query/_index.md @@ -45,20 +45,18 @@ 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. +Redis Ltd. provides commercial support for Redis. 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/design.md b/content/develop/interact/search-and-query/administration/design.md index 053811c873..ef1b3ba281 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 78aa321101..e4006a6266 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,25 +283,25 @@ Highlighting will highlight the found term and its variants with a user-defined ## Auto-completion -Another important feature for Redis Stack is its auto-complete 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 is its auto-complete 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 auto-completer supports Unicode, allowing for fuzzy matches in non-latin languages as well. +Redis's auto-completer supports Unicode, allowing for fuzzy matches in non-latin languages as well. ## Search engine internals ### 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 @@ -310,7 +310,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: @@ -331,17 +331,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. @@ -359,14 +359,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 @@ -377,13 +377,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 adf7e27458..09e3deee7e 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 43b8c19b6d..1ce3294385 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 b07e305dd7..d061f238e2 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/dialects.md +++ b/content/develop/interact/search-and-query/advanced-concepts/dialects.md @@ -15,7 +15,7 @@ title: Query dialects weight: 5 --- -Redis Stack currently supports four query dialects for use with the [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/), [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/), and other Redis Query Engine commands. +Redis Community Edition currently supports four query dialects for use with the [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/), [`FT.AGGREGATE`]({{< baseurl >}}/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` @@ -25,7 +25,7 @@ This dialect is also the default dialect. See below for information about changi ## `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` 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 f9e1040c92..114e6a56ea 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/scoring.md b/content/develop/interact/search-and-query/advanced-concepts/scoring.md index 2c42227d8d..46ca41aa59 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`]({{< baseurl >}}/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`]({{< baseurl >}}/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 8168177d11..a283f4bccd 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 277c8b7dd2..d071df256b 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 08b2b5a094..69b49db84d 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,11 +9,9 @@ categories: - oss - kubernetes - clients -description: 'Querying and searching in Redis Stack can be tuned through multiple +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. - - ' + while other parameters can be set either at load-time or at run-time.' linkTitle: Configuration parameters title: Configuration parameters weight: 4 @@ -43,7 +41,7 @@ $ redis-server --loadmodule ./redisearch.so [OPT VAL]... ## Set configuration parameters at run-time (for supported parameters) -RediSearch exposes the `FT.CONFIG` endpoint to allow for the setting and retrieval of configuration parameters at run-time. +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: @@ -60,7 +58,7 @@ FT.CONFIG GET * Values set using [`FT.CONFIG SET`]({{< baseurl >}}/commands/ft.config-set/) are not persisted after server restart. -## RediSearch configuration parameters +## Redis Query Engine configuration parameters The following table summarizes which configuration parameters can be set at module load-time and run-time: @@ -144,7 +142,7 @@ Deprecated in v1.6. From this version, SAFEMODE is the default. If you would st {{% /alert %}} -If present in the argument list, RediSearch will turn off concurrency for query processing and work in a single thread. +If present in the argument list, Redis Query Engine will turn off concurrency for query processing and work in a single thread. This is useful if data consistency is extremely important, and avoids a situation where deletion of documents while querying them can cause momentarily inconsistent results. For example, documents that were valid during the invocation of the query are not returned because they were deleted during query processing. @@ -183,7 +181,7 @@ $ redis-server --loadmodule ./redisearch.so CONCURRENT_WRITE_MODE ### EXTLOAD -If present, RediSearch will try to load an extension dynamic library from its specified file path. See [Extensions]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}) for details. +If present, Redis Query Engine will try to load an extension dynamic library from its specified file path. See [Extensions]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}) for details. #### Default @@ -450,7 +448,7 @@ $ redis-server --loadmodule ./redisearch.so GC_POLICY FORK FORK_GC_RUN_INTERVAL ### FORK_GC_RETRY_INTERVAL -Interval (in seconds) in which RediSearch will retry to run `fork GC` in case of a failure. Usually, a failure could happen when the Redis fork API does not allow for more than one fork to be created at the same time. +Interval (in seconds) in which Redis Query Engine will retry to run `fork GC` in case of a failure. Usually, a failure could happen when the Redis fork API does not allow for more than one fork to be created at the same time. #### Default @@ -496,7 +494,7 @@ $ redis-server --loadmodule ./redisearch.so GC_POLICY FORK FORK_GC_CLEAN_THRESHO ### UPGRADE_INDEX -This configuration is a special configuration option introduced to upgrade indices from v1.x RediSearch versions, otherwise known as legacy indices. 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 api]({{< baseurl >}}/commands/ft.create/). +This configuration is a special configuration option introduced to upgrade indices from v1.x Redis Query Engine versions, otherwise known as legacy indices. 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 api]({{< baseurl >}}/commands/ft.create/). #### Default 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 3e7b990c16..8c3da8ce70 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 @@ -84,7 +84,7 @@ FT.SEARCH cities "@coords:[2.34 48.86 1000 km]" ## 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`]({{< baseurl >}}/commands/ft.create/) using this syntax: @@ -142,7 +142,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 ac51965991..a9ac7e2669 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 513ce9000c..c977176cbc 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`]({{< baseurl >}}/commands/json.set/) and [`JSON.ARRAPPEND`]({{< baseurl >}}/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..5bd9f3f9a9 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 (e.g., 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 cfb9672be4..cb774d5cb8 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]({{< baseurl >}}/commands/ft.search) and [FT.AGGREGATE]({{< baseurl >}}/commands/ft.aggregate) query commands. You should use [FT.SEARCH]({{< baseurl >}}/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]({{< baseurl >}}/commands/ft.aggregate) command. +Redis Community Edition distinguishes between the [FT.SEARCH]({{< baseurl >}}/commands/ft.search) and [FT.AGGREGATE]({{< baseurl >}}/commands/ft.aggregate) query commands. You should use [FT.SEARCH]({{< baseurl >}}/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]({{< baseurl >}}/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]({{< baseurl >}}/commands/ft.se 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/geo-spatial.md b/content/develop/interact/search-and-query/query/geo-spatial.md index ff57102ccc..b2e86b22a1 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. +Redis Community Edition'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 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 4406301b1e..a5340ef54a 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. From 323370967c6420fa8954826191ac75aacf8a7cbf Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 22 Oct 2024 07:36:15 -0700 Subject: [PATCH 03/32] More edits for CE 8.0 --- content/operate/oss_and_stack/_index.md | 6 +++--- .../operate/oss_and_stack/install/_index.md | 7 +++---- .../install/install-redis/_index.md | 12 ++++-------- .../operate/oss_and_stack/reference/_index.md | 2 +- .../stack-with-enterprise/_index.md | 6 +++--- .../deprecated-features/_index.md | 2 +- .../enterprise-capabilities.md | 18 ++++++++++-------- .../stack-with-enterprise/install/_index.md | 2 +- .../stack-with-enterprise/json/_index.md | 6 +++--- .../release-notes/_index.md | 6 +++--- .../stack-with-enterprise/search/_index.md | 2 +- .../stack-with-enterprise/stack-quickstart.md | 8 ++++---- .../stack-with-enterprise/timeseries/_index.md | 6 +++--- 13 files changed, 40 insertions(+), 43 deletions(-) diff --git a/content/operate/oss_and_stack/_index.md b/content/operate/oss_and_stack/_index.md index a19533f46f..0c62237aa4 100644 --- a/content/operate/oss_and_stack/_index.md +++ b/content/operate/oss_and_stack/_index.md @@ -1,5 +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 +title: Redis Community Edition +description: Operate Redis Community Edition. Redis Community Edition (CE) v8.0 replaces Redis Stack. +linkTitle: Redis Community Edition --- \ No newline at end of file diff --git a/content/operate/oss_and_stack/install/_index.md b/content/operate/oss_and_stack/install/_index.md index 33ba1e6ccb..54914f96f6 100644 --- a/content/operate/oss_and_stack/install/_index.md +++ b/content/operate/oss_and_stack/install/_index.md @@ -7,15 +7,14 @@ categories: description: How to install your preferred Redis flavor on your target platform hideListLinks: true linkTitle: Install -title: Install Redis or Redis Stack +title: Install Redis Community Edition weight: 30 --- -You can install [Redis]({{< relref "/operate/oss_and_stack/" >}}) or [Redis Stack]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis and Redis Stack are available on Linux, macOS, and Windows. +You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is available on Linux, macOS, and Windows. 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" >}}) -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 Community Edition 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/install-redis/_index.md index 28e123b93b..837c3644f0 100644 --- a/content/operate/oss_and_stack/install/install-redis/_index.md +++ b/content/operate/oss_and_stack/install/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" >}}) 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/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/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 c85cbce5d4..99ff7f9c7f 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 Community Edition 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. +[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/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 315231bba1..be1eed6598 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,11 @@ 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 | | [Gears]({{< relref "/operate/oss_and_stack/stack-with-enterprise/gears-v1" >}}) | ✅ Supported | ❌ Not supported | +**DWD NOTE**: I think Graph, Triggers, and Gears should be removed from the above table. + ## Feature compatibility -The following tables show Redis Enterprise feature support for each 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 +59,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/install/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md index 7b059d3d25..e045d066d7 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/install/_index.md @@ -11,7 +11,7 @@ linkTitle: Install and upgrade modules weight: 4 --- -Several modules, which provide Redis Stack features, come packaged with [Redis Enterprise]({{< relref "/operate/rs" >}}). As of version 7.4.2, Redis Enterprise includes two feature sets, compatible with different Redis database versions. However, if you want to use additional modules or upgrade a module to a more recent version, you need to: +Several modules, which provide Redis Community Edition features, come packaged with [Redis Enterprise]({{< relref "/operate/rs" >}}). As of version 7.4.2, Redis Enterprise includes two feature sets, compatible with different Redis database versions. However, if you want to use additional modules or upgrade a module to a more recent version, you need to: 1. [Install a module package]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-cluster" >}}) on the cluster. 1. [Enable a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/add-module-to-database" >}}) for a new database or [upgrade a module]({{< relref "/operate/oss_and_stack/stack-with-enterprise/install/upgrade-module" >}}) in an existing database. 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 178861c934..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: Redis Stack and modules release notes +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/search/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/search/_index.md index 5d5841b2d5..64714d205e 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]({{< baseurl >}}/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]({{< baseurl >}}/commands/ft.sugadd). ## Search and query Active-Active databases 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 f5bdb7cd90..66bd53f503 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]({{< baseurl >}}/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]({{< baseurl >}}/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]({{< baseurl >}}/develop/data-types/timeseries ### 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" >}} From 24c08ac0bb24938903add016cc35075c73f49ae3 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Wed, 11 Dec 2024 09:20:55 -0800 Subject: [PATCH 04/32] DEV: module configuration changes for CE8 (#956) * DEV: CONFIG for modules changes for CE8 * Renaming file * Apply suggestions from Rachel's code review Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com> * Apply suggestions from Rachel's code review (part 2) Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com> * Apply suggestions from Lior's code review * Apply suggestions from Lior's code review (part 2) --------- Co-authored-by: Rachel Elledge <86307637+rrelledge@users.noreply.github.com> --- content/commands/ft.config-get/index.md | 8 +- content/commands/ft.config-set/index.md | 10 +- content/commands/module-load/index.md | 4 + .../data-types/probabilistic/Configuration.md | 101 --- .../data-types/probabilistic/configuration.md | 174 +++++ .../data-types/timeseries/configuration.md | 296 ++++----- .../administration/configuration.md | 587 +++++++++++++++++ .../advanced-concepts/query_syntax.md | 2 +- .../configuration-parameters.md | 602 ------------------ .../search-and-query/query/combined.md | 2 +- .../stack-with-enterprise/bloom/config.md | 6 +- .../redisearch-1.4-release-notes.md | 2 +- .../stack-with-enterprise/search/config.md | 27 +- .../timeseries/config.md | 10 +- 14 files changed, 920 insertions(+), 911 deletions(-) delete mode 100644 content/develop/data-types/probabilistic/Configuration.md create mode 100644 content/develop/data-types/probabilistic/configuration.md create mode 100644 content/develop/interact/search-and-query/administration/configuration.md delete mode 100644 content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md diff --git a/content/commands/ft.config-get/index.md b/content/commands/ft.config-get/index.md index 2113fc9a71..f000e44b4e 100644 --- a/content/commands/ft.config-get/index.md +++ b/content/commands/ft.config-get/index.md @@ -15,17 +15,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-set/index.md b/content/commands/ft.config-set/index.md index e5cd3d1650..4c100b117b 100644 --- a/content/commands/ft.config-set/index.md +++ b/content/commands/ft.config-set/index.md @@ -15,17 +15,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 +37,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/module-load/index.md b/content/commands/module-load/index.md index 734c291b46..a20b4ea6a2 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 via the Redis CLI with configuration parameters is deprecated. +{{< /note >}} \ 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/configuration.md b/content/develop/data-types/probabilistic/configuration.md new file mode 100644 index 0000000000..c6baddae4d --- /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`]({{< baseurl >}}/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 error ratio for Bloom filters. + +Type: double + +Valid range: `[0 .. 1]` + +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/timeseries/configuration.md b/content/develop/data-types/timeseries/configuration.md index 2ae0b96963..5661785831 100644 --- a/content/develop/data-types/timeseries/configuration.md +++ b/content/develop/data-types/timeseries/configuration.md @@ -9,91 +9,82 @@ 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`]({{< baseurl >}}/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]... -``` - -From the command line: - -```sh -$ redis-server --loadmodule ./redistimeseries.so [OPT VAL]... -``` - -## RedisTimeSeries configuration parameters +--- -The following table summarizes which configuration parameters can be set at module load-time and run-time: +### ts-chunk-size-bytes -| 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: | +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. -### NUM_THREADS +Type: integer -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! +Valid range: `[48 .. 1048576]`; must be a multiple of 8 -#### Default +Default: `4096` -`3` +### ts-compaction-policy -#### Example +Default compaction rules for newly created keys with [`TS.ADD`]({{< baseurl >}}/commands/ts.add/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/). -``` -$ redis-server --loadmodule ./redistimeseries.so NUM_THREADS 3 -``` +Type: string -### COMPACTION_POLICY +Default: No compaction rules. -Default compaction rules for newly created key with [`TS.ADD`]({{< baseurl >}}/commands/ts.add/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/). +**Discussion** -Note that `COMPACTION_POLICY` has no effect on keys created with [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/). To understand the motivation for this behavior, consider the following scenario: Suppose a `COMPACTION_POLICY` is defined, but then one wants to manually create an additional compaction rule (using [`TS.CREATERULE`]({{< baseurl >}}/commands/ts.createrule/)) which requires first creating an empty destination key (using [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/)). But now there is a problem: due to the `COMPACTION_POLICY`, automatic compactions would be undesirably created for that destination key. +`COMPACTION_POLICY` has no effect on keys created with [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/). To understand the motivation for this behavior, consider the following scenario: Suppose a `COMPACTION_POLICY` is defined, but then one wants to manually create an additional compaction rule (using [`TS.CREATERULE`]({{< baseurl >}}/commands/ts.createrule/)) which requires first creating an empty destination key (using [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/)). But now there is a problem: due to the `COMPACTION_POLICY`, automatic compactions would be undesirably created for that destination key. 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 +104,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`) @@ -127,152 +118,141 @@ Each rule is separated by a semicolon (`;`), the rule consists of multiple field When a compaction policy is defined, compaction rules will be created automatically for newly created time series, and their key would be set to: -* Before RedisTimeSeries v1.8: +* Before v1.8: _key_dur_agg_ where _key_ is the key of the source time series, _dur_ is the bucket duration, and _agg_ is the aggregator. -* Since RedisTimeSeries v1.8: +* Since v1.8: _key_dur_agg_aln_ where _key_ is the key of the source time series, _dur_ is the bucket duration, _agg_ is the aggregator, and _aln_ is the alignment timestamp. -Examples: - -- `max:1M:1h` - Aggregate using `max` over one minute and retain the last hour -- `twa:1d:0m:360M` - Aggregate daily [06:00 .. 06:00) using `twa`; no expiration +**Examples** -#### Default +- `max:1M:1h` - Aggregate using `max` over one minute and retain the last hour. +- `twa:1d:0m:360M` - Aggregate daily [06:00 .. 06:00) using `twa`; no expiration. -No compaction rules. +### ts-duplicate-policy -#### Example +The default policy for handling insertion ([`TS.ADD`]({{< baseurl >}}/commands/ts.add/) and [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/)) of multiple samples with identical timestamps, with one of the following values: -``` -$ redis-server --loadmodule ./redistimeseries.so COMPACTION_POLICY max:1m:1h;min:10s:5d:10d;last:5M:10m;avg:2h:10d;avg:3d:100d -``` - -### RETENTION_POLICY - -Default retention period, in milliseconds, for newly created keys. - -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 timestamp and the timestamps passed to subsequent [`TS.ADD`]({{< baseurl >}}/commands/ts.add/), [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/) calls. - -The value `0` means no expiration. - -When both `COMPACTION_POLICY` and `RETENTION_POLICY` are specified, the retention of newly created compactions is according to the retention time specified in `COMPACTION_POLICY`. - -#### Default + | 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 | + | `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. | -0 +The default value is applied to each new time series upon its creation. -#### Example +Type: string -Setting the default retention to 300 days: +Default: `BLOCK` -``` -$ redis-server --loadmodule ./redistimeseries.so RETENTION_POLICY 25920000000 -``` +**Precedence order** -### DUPLICATE_POLICY +Since the duplication policy can be provided at different levels, the actual precedence of the used policy will be: -Is policy for handling insertion ([`TS.ADD`]({{< baseurl >}}/commands/ts.add/) and [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/)) of multiple samples with identical timestamps, with one of the following values: +1. [`TS.ADD`]({{< baseurl >}}/commands/ts.add/)'s `ON_DUPLICATE_POLICY` optional argument. +1. Key-level policy, as set with [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/)'s and [`TS.ALTER`]({{< baseurl >}}/commands/ts.alter/)'s `DUPLICATE_POLICY` optional argument. +1. The `ts-duplicate-policy` configuration parameter. +1. The default policy. - | 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 | - | `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. | +### ts-encoding -#### Precedence order -Since the duplication policy can be provided at different levels, the actual precedence of the used policy will be: +Note: Before v1.6 this configuration parameter was named `CHUNK_TYPE`. -1. [`TS.ADD`]({{< baseurl >}}/commands/ts.add/)'s `ON_DUPLICATE_policy` optional argument -2. Key-level policy (as set with [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/)'s and [`TS.ALTER`]({{< baseurl >}}/commands/ts.alter/)'s `DUPLICATE_POLICY` optional argument) -3. The `DUPLICATE_POLICY` module configuration parameter -4. The default policy +Default chunk encoding for automatically created time series keys when [ts-compaction-policy](#ts-compaction-policy) is configured. -#### Default +Type: string -The default policy is `BLOCK`. Both new and pre-existing keys will conform to this default policy. +Valid values: `COMPRESSED`, `UNCOMPRESSED` -#### Example +Default: `COMPRESSED` -``` -$ redis-server --loadmodule ./redistimeseries.so DUPLICATE_POLICY LAST -``` +### ts-ignore-max-time-diff and ts-ignore-max-val-diff -### ENCODING +Default values for newly created keys. -Default chunk encoding for automatically created keys when [COMPACTION_POLICY](#COMPACTION_POLICY) is configured. +Types: +- `ts-ignore-max-time-diff`: integer +- `ts-ignore-max-val-diff`: double -Possible values: `COMPRESSED`, `UNCOMPRESSED`. +Valid ranges: +- `ts-ignore-max-time-diff`: `[0 .. 9,223,372,036,854,775,807]` +- `ts-ignore-max-val-diff`: `[0 .. 1.7976931348623157e+308]` -Note: Before RedisTimeSeries 1.6 this configuration parameter was named `CHUNK_TYPE`. +Defaults: +- `ts-ignore-max-time-diff`: 0 +- `ts-ignore-max-val-diff`: 0.0 -#### Default +**Discussion** -`COMPRESSED` +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. -#### Example +A new sample is considered a duplicate and is ignored if the following conditions are met: -``` -$ redis-server --loadmodule ./redistimeseries.so COMPACTION_POLICY max:1m:1h; ENCODING COMPRESSED -``` +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`. -### CHUNK_SIZE_BYTES +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`. -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. +### ts-num-threads -#### Default +The maximum number of per-shard threads for cross-key queries when using cluster mode ([`TS.MRANGE`]({{< baseurl >}}/commands/ts.mrange/), [`TS.MREVRANGE`]({{< baseurl >}}/commands/ts.mrevrange/), [`TS.MGET`]({{< baseurl >}}/commands/ts.mget/), and [`TS.QUERYINDEX`]({{< baseurl >}}/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! -4096 +Type: integer -#### Example +Valid range: `[1..16]` -``` -$ redis-server --loadmodule ./redistimeseries.so COMPACTION_POLICY max:1m:1h; CHUNK_SIZE_BYTES 2048 -``` +Redis CE default: `3` -### OSS_GLOBAL_PASSWORD +Redis Software default: Set by plan, and automatically updates when you change your plan. -Global Redis Community Edition cluster password used for connecting to other shards. +Redis Cloud defaults: +- Flexible & Annual: Set by plan +- Free & Fixed: `1` -#### Default +### ts-retention-policy -Not set +Default retention period, in milliseconds, for newly created keys. -#### Example +Type: integer -``` -$ redis-server --loadmodule ./redistimeseries.so OSS_GLOBAL_PASSWORD password -``` +Valid range: `[0 .. 9,223,372,036,854,775,807]` -### IGNORE_MAX_TIME_DIFF and IGNORE_MAX_VAL_DIFF +Default: `0` -Default values for newly created keys. +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`]({{< baseurl >}}/commands/ts.add/), [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/) calls. -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. +The value `0` means no expiration. -A new sample is considered a duplicate and is ignored if the following conditions are met: +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`. -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`. +## Setting configuration parameters on module load (deprecated) -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`. +These methods are deprecated beginning with Redis CE v8.0.0. -#### Defaults +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: -`IGNORE_MAX_TIME_DIFF`: 0 +In [redis.conf]({{< relref "/operate/oss_and_stack/management/config" >}}): -`IGNORE_MAX_VAL_DIFF`: 0.0 +```sh +loadmodule ./redistimeseries.so [OPT VAL]... +``` -#### Example +From the [Redis CLI]({{< relref "/develop/tools/cli" >}}), using the [MODULE LOAD]({{< relref "/commands/module-load" >}}) command: ``` -$ redis-server --loadmodule ./redistimeseries.so IGNORE_MAX_TIME_DIFF 1 IGNORE_MAX_VALUE_DIFF 0.1 +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/interact/search-and-query/administration/configuration.md b/content/develop/interact/search-and-query/administration/configuration.md new file mode 100644 index 0000000000..048188c6f6 --- /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 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`]({{< baseurl >}}/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_NUMERIC_EMPTY_NODES | [search-fork-gc-clean-numeric-empty-nodes](#search-fork-gc-clean-numeric-empty-nodes) | :white_large_square: ||| +| 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-forkgc-sleep-before-exit](#search-forkgc-sleep-before-exit) | :white_check_mark: ||| +| FRISOINI | [search-frisoini](#search-frisoini) | :white_large_square: | ✅ Supported

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

| ✅ Flexible & Annual
❌ Free & Fixed | +| GCSCANSIZE | [search-gc-scansize](#search-gc-scansize) | :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-searchresults](#search-max-searchresults) | :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-nogc](#search-nogc) | :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. | :white_large_square: ||| +| PRIVILEGED_THREADS_NUM | Deprecated in v8.0.0. | :white_large_square: ||| +| WORKER_THREADS | Deprecated in v8.0.0. | :white_large_square: ||| +| SAFEMODE | Deprecated in v1.6.0. This is now the default setting | :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]({{< baseurl >}}/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`]({{< baseurl >}}/commands/ft.create/), [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/), [`FT.EXPLAIN`]({{< baseurl >}}/commands/ft.explain/), [`FT.EXPLAINCLI`]({{< baseurl >}}/commands/ft.explaincli/), and [`FT.SPELLCHECK`]({{< baseurl >}}/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-forkgc-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-frisoini + +If present, load the custom Chinese dictionary from the specified path. See [Using custom dictionaries]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/chinese#using-custom-dictionaries) for more details. + +Type: string + +Default: not set + +### search-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 `search-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-scansize + +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`]({{< baseurl >}}/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`]({{< baseurl >}}/commands/ft.cursor-del/) and/or [`MAXIDLE`]({{< baseurl >}}/commands/ft.aggregate/) prior to modifying `INDEX_CURSOR_LIMIT` +* See [Cursor API]({{< baseurl >}}/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-searchresults + +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-nogc + +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]({{< baseurl >}}/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`]({{< baseurl >}}/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`]({{< baseurl >}}/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`]({{< baseurl >}}/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/advanced-concepts/query_syntax.md b/content/develop/interact/search-and-query/advanced-concepts/query_syntax.md index cf5f3258da..1892b163aa 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]({{< baseurl >}}/develop/interact/search-and-query/basic-constructs/configuration-parameters#default_dialect) configuration parameter. +You can also see the [DEFAULT_DIALECT]({{< baseurl >}}/develop/interact/search-and-query/administration/configuration#default_dialect) configuration parameter. 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 deleted file mode 100644 index df2e870b10..0000000000 --- a/content/develop/interact/search-and-query/basic-constructs/configuration-parameters.md +++ /dev/null @@ -1,602 +0,0 @@ ---- -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: 4 ---- - -## Set configuration parameters at module load-time - -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) - -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`]({{< baseurl >}}/commands/ft.config-set/) are not persisted after server restart. - -## Redis Query Engine configuration parameters - -The following table summarizes which configuration parameters can be set at module load-time and run-time: - -| Configuration Parameter | Load-time | Run-time | -| :------- | :----- | :----------- | -| [TIMEOUT](#timeout) | :white_check_mark: | :white_check_mark: | -| [ON_TIMEOUT](#on_timeout) | :white_check_mark: | :white_check_mark: | -| [SAFEMODE](#safemode) deprecated in v1.6 | :white_check_mark: | :white_check_mark: | -| [CONCURRENT_WRITE_MODE](#concurrent_write_mode) | :white_check_mark: | :white_check_mark: | -| [EXTLOAD](#extload) | :white_check_mark: | :white_check_mark: | -| [MINPREFIX](#minprefix) | :white_check_mark: | :white_check_mark: | -| [MINSTEMLEN](#minstemlen) | :white_check_mark: | :white_check_mark: | -| [MAXPREFIXEXPANSIONS](#maxprefixexpansions) | :white_check_mark: | :white_check_mark: | -| [MAXDOCTABLESIZE](#maxdoctablesize) | :white_check_mark: | :white_check_mark: | -| [MAXSEARCHRESULTS](#maxsearchresults) | :white_check_mark: | :white_check_mark: | -| [MAXAGGREGATERESULTS](#maxaggregateresults) | :white_check_mark: | :white_check_mark: | -| [FRISOINI](#frisoini) | :white_check_mark: | :white_check_mark: | -| [CURSOR_MAX_IDLE](#cursor_max_idle) | :white_check_mark: | :white_check_mark: | -| [PARTIAL_INDEXED_DOCS](#partial_indexed_docs) | :white_check_mark: | :white_check_mark: | -| [GC_SCANSIZE](#gc_scansize) | :white_check_mark: | :white_large_square: | -| [GC_POLICY](#gc_policy) | :white_check_mark: | :white_check_mark: | -| [NOGC](#nogc) | :white_check_mark: | :white_check_mark: | -| [FORK_GC_RUN_INTERVAL](#fork_gc_run_interval) | :white_check_mark: | :white_check_mark: | -| [FORK_GC_RETRY_INTERVAL](#fork_gc_retry_interval) | :white_check_mark: | :white_check_mark: | -| [FORK_GC_CLEAN_THRESHOLD](#fork_gc_clean_threshold) | :white_check_mark: | :white_check_mark: | -| [UPGRADE_INDEX](#upgrade_index) | :white_check_mark: | :white_check_mark: | -| [OSS_GLOBAL_PASSWORD](#oss_global_password) | :white_check_mark: | :white_large_square: | -| [DEFAULT_DIALECT](#default_dialect) | :white_check_mark: | :white_check_mark: | -| [VSS_MAX_RESIZE](#vss_max_resize) | :white_check_mark: | :white_check_mark: | -| [INDEX_CURSOR_LIMIT](#index_cursor_limit) | :white_check_mark: | :white_check_mark: | - ---- - -### 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 `ON_TIMEOUT`. The timeout can be disabled by setting it to 0. - -{{% alert title="Notes" color="info" %}} - -* `TIMEOUT` refers to query time only. -* Parsing the query is not counted towards `TIMEOUT`. -* If `TIMEOUT` was not reached during the search, finalizing operations such as loading document content or reducers continue. - -{{% /alert %}} - -#### Default - -500 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so TIMEOUT 100 -``` - ---- - -### ON_TIMEOUT - -The response policy for queries that exceed the `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. - -#### Default - -RETURN - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so ON_TIMEOUT fail -``` - ---- - -### SAFEMODE - -{{% alert title="Deprecated" color="info" %}} - -Deprecated in v1.6. From this version, SAFEMODE is the default. If you would still like to re-enable the concurrent mode for writes, use [CONCURRENT_WRITE_MODE](#concurrent_write_mode). - -{{% /alert %}} - -If present in the argument list, Redis Query Engine will turn off concurrency for query processing and work in a single thread. - -This is useful if data consistency is extremely important, and avoids a situation where deletion of documents while querying them can cause momentarily inconsistent results. For example, documents that were valid during the invocation of the query are not returned because they were deleted during query processing. - -#### Default -Off (not present) - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so SAFEMODE -``` - -___ - -### CONCURRENT_WRITE_MODE - -If enabled, write queries will be performed concurrently, but only the tokenization part is executed concurrently. The actual write operation still requires holding the Redis Global Lock. - -#### Default - -Not set - "disabled" - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so CONCURRENT_WRITE_MODE -``` - -{{% alert title="Note" color="info" %}} - -* Added in v1.6 - -{{% /alert %}} - ---- - -### EXTLOAD - -If present, Redis Query Engine will try to load an extension dynamic library from its specified file path. See [Extensions]({{< relref "/develop/interact/search-and-query/administration/extensions" >}}) for details. - -#### Default - -None - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so EXTLOAD ./ext/my_extension.so -``` - ---- - -### MINPREFIX - -The minimum number of characters allowed for prefix queries (e.g., `hel*`). Setting it to 1 can hurt performance. - -#### Default - -2 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MINPREFIX 3 -``` - ---- - -### MINSTEMLEN - -The minimum word length to stem. The default value is `4`. Setting it lower than `4` can reduce performance. - -#### Default - -4 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MINSTEMLEN 3 -``` - ---- - -### MAXPREFIXEXPANSIONS - -The maximum number of expansions allowed for query prefixes. Setting it too high can cause performance issues. If MAXPREFIXEXPANSIONS 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. - -#### Default - -200 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MAXPREFIXEXPANSIONS 1000 -``` - ---- - -### MAXDOCTABLESIZE - -The maximum size of the internal hash table used for storing the 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. - -#### Default - -1000000 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MAXDOCTABLESIZE 3000000 -``` - ---- - -### MAXSEARCHRESULTS - -The maximum number of results to be returned by the [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/) command if LIMIT is used. -Setting value to `-1` will remove the limit. - -#### Default - -1000000 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MAXSEARCHRESULTS 3000000 -``` - ---- - -### MAXAGGREGATERESULTS - -The maximum number of results to be returned by the [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/) command if LIMIT is used. -Setting value to `-1` will remove the limit. - -#### Default - -unlimited - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so MAXAGGREGATERESULTS 3000000 -``` - ---- - -### FRISOINI - -If present, load the custom Chinese dictionary from the specified path. See [Using custom dictionaries]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/chinese#using-custom-dictionaries) for more details. - -#### Default - -Not set - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so FRISOINI /opt/dict/friso.ini -``` - ---- - -### CURSOR_MAX_IDLE - -The maximum idle time (in ms) that can be set to the [cursor api]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api). - -#### Default - -300000 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so CURSOR_MAX_IDLE 500000 -``` - -{{% alert title="Note" color="info" %}} - -* Added in v1.6 - -{{% /alert %}} - ---- - -### PARTIAL_INDEXED_DOCS - -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. - -#### Considerations - -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. - -#### Default - -0 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so PARTIAL_INDEXED_DOCS 1 -``` - -{{% alert title="Note" color="info" %}} - -* Added in v2.0.0 - -{{% /alert %}} - - ---- - -### GC_SCANSIZE - -The bulk size of the internal GC used for cleaning up indexes. - -#### Default - -100 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so GC_SCANSIZE 10 -``` - ---- - -### GC_POLICY - -The garbage collection policy. Supported policies are: - -* **FORK**: uses a forked thread for garbage collection (v1.4.1 and above). - This is the default GC policy since version 1.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. - -#### Default - -FORK - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so GC_POLICY FORK -``` - -{{% alert title="Note" color="info" %}} - -* When the `GC_POLICY` is `FORK` it can be combined with the options below. - -{{% /alert %}} - ---- - -### NOGC - -If set, Garbage Collection is disabled for all indexes. This is used mainly for debugging and testing and should not be set by users. - -#### Default - -Not set - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so NOGC -``` - ---- - -### FORK_GC_RUN_INTERVAL - -Interval (in seconds) between two consecutive `fork GC` runs. - -#### Default - -30 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so GC_POLICY FORK FORK_GC_RUN_INTERVAL 60 -``` - -{{% alert title="Note" color="info" %}} - -* Can only be combined with `GC_POLICY FORK` - -{{% /alert %}} - ---- - -### FORK_GC_RETRY_INTERVAL - -Interval (in seconds) in which Redis Query Engine will retry to run `fork GC` in case of a failure. Usually, a failure could happen when the Redis fork API does not allow for more than one fork to be created at the same time. - -#### Default - -5 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so GC_POLICY FORK FORK_GC_RETRY_INTERVAL 10 -``` - -{{% alert title="Notes" color="info" %}} - -* Can only be combined with `GC_POLICY FORK` -* Added in v1.4.16 - -{{% /alert %}} - ---- - -### FORK_GC_CLEAN_THRESHOLD - -The `fork GC` will only start to clean when the number of not cleaned documents exceeds this threshold, otherwise it will skip this run. While the default value is 100, it's highly recommended to change it to a higher number. - -#### Default - -100 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so GC_POLICY FORK FORK_GC_CLEAN_THRESHOLD 10000 -``` - -{{% alert title="Notes" color="info" %}} - -* Can only be combined with `GC_POLICY FORK` -* Added in v1.4.16 - -{{% /alert %}} - ---- - -### UPGRADE_INDEX - -This configuration is a special configuration option introduced to upgrade indices from v1.x Redis Query Engine versions, otherwise known as legacy indices. 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 api]({{< baseurl >}}/commands/ft.create/). - -#### Default - -There is no default for index name, and the other arguments have the same defaults as with the [`FT.CREATE`]({{< baseurl >}}/commands/ft.create/) API. - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so 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 %}} - ---- - -### OSS_GLOBAL_PASSWORD - -Global Redis Community Edition cluster password that will be used to connect to other shards. - -#### Default - -Not set - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so OSS_GLOBAL_PASSWORD password -``` - -{{% alert title="Notes" color="info" %}} - -* Only relevant when Coordinator is used -* Added in v2.0.3 - -{{% /alert %}} - ---- - -### DEFAULT_DIALECT - -The default -[DIALECT]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}) -to be used by [`FT.CREATE`]({{< baseurl >}}/commands/ft.create/), [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/), [`FT.EXPLAIN`]({{< baseurl >}}/commands/ft.explain/), [`FT.EXPLAINCLI`]({{< baseurl >}}/commands/ft.explaincli/), and [`FT.SPELLCHECK`]({{< baseurl >}}/commands/ft.spellcheck/). -See [Query dialects]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}) -for more information. - -#### Default - -1 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so DEFAULT_DIALECT 2 -``` - ---- - -### VSS_MAX_RESIZE - -The maximum memory resize for vector similarity indexes in bytes. This value will override default memory limits if you need to allow for a large [`BLOCK_SIZE`]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/vectors/#creation-attributes-per-algorithm). - -#### Default - -0 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so VSS_MAX_RESIZE 52428800 # 50MB -``` - -{{% alert title="Note" color="info" %}} - -* Added in v2.4.8 - -{{% /alert %}} -### INDEX_CURSOR_LIMIT - -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`]({{< baseurl >}}/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 at opening 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`]({{< baseurl >}}/commands/ft.cursor-del/) and/or [`MAXIDLE`]({{< baseurl >}}/commands/ft.aggregate/) prior to modifying `INDEX_CURSOR_LIMIT` -* See [Cursor API]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api) for more details. - -* Added in 2.10.8 -{{% /alert %}} - -#### Default - -128 - -#### Example - -``` -$ redis-server --loadmodule ./redisearch.so INDEX_CURSOR_LIMIT 180 -``` \ No newline at end of file diff --git a/content/develop/interact/search-and-query/query/combined.md b/content/develop/interact/search-and-query/query/combined.md index 0a043b0253..29de811b4d 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]({{< baseurl >}}/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]({{< baseurl >}}/develop/interact/search-and-query/administration/configuration#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/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/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/config.md b/content/operate/oss_and_stack/stack-with-enterprise/search/config.md index eb43029fbb..251ec2ce18 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/timeseries/config.md b/content/operate/oss_and_stack/stack-with-enterprise/timeseries/config.md index c44d040f57..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,12 +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` | - +See [configuration parameters]({{< relref "/develop/data-types/timeseries/configuration" >}}) in the Develop section for parameter details and compatibility with Redis Software and Redis Cloud. From 161f6a7f4ec3fe3353d9b39f6861396f665b3eaa Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Fri, 13 Dec 2024 08:14:35 -0800 Subject: [PATCH 05/32] DEV: ACL changes for CE8 (#975) * DEV: ACL changes for CE8 * Applied suggestions from Lior's code review (part 1) * Applied suggestions from Lior's code review (part 2) * Fix for something completely unrelated * Applied suggestions from Lior's code review (part 3) --- content/commands/acl-cat/index.md | 8 + content/commands/bf.add/index.md | 4 + content/commands/bf.card/index.md | 4 + content/commands/bf.exists/index.md | 4 + content/commands/bf.info/index.md | 4 + content/commands/bf.insert/index.md | 4 + content/commands/bf.loadchunk/index.md | 4 + content/commands/bf.madd/index.md | 4 + content/commands/bf.mexists/index.md | 4 + content/commands/bf.reserve/index.md | 4 + content/commands/bf.scandump/index.md | 4 + content/commands/cf.add/index.md | 4 + content/commands/cf.addnx/index.md | 4 + content/commands/cf.count/index.md | 4 + content/commands/cf.del/index.md | 4 + content/commands/cf.exists/index.md | 4 + content/commands/cf.info/index.md | 4 + content/commands/cf.insert/index.md | 4 + content/commands/cf.insertnx/index.md | 4 + content/commands/cf.loadchunk/index.md | 4 + content/commands/cf.mexists/index.md | 4 + content/commands/cf.reserve/index.md | 4 + content/commands/cf.scandump/index.md | 4 + content/commands/cms.incrby/index.md | 3 + content/commands/cms.info/index.md | 4 + content/commands/cms.initbydim/index.md | 4 + content/commands/cms.initbyprob/index.md | 4 + content/commands/cms.merge/index.md | 3 + content/commands/cms.query/index.md | 3 + content/commands/ft._list/index.md | 4 + content/commands/ft.aggregate/index.md | 10 +- content/commands/ft.aliasadd/index.md | 3 + content/commands/ft.aliasdel/index.md | 3 + content/commands/ft.aliasupdate/index.md | 3 + content/commands/ft.alter/index.md | 3 + content/commands/ft.config-get/index.md | 2 + content/commands/ft.config-help/index.md | 2 + content/commands/ft.config-set/index.md | 4 + content/commands/ft.create/index.md | 3 + content/commands/ft.cursor-del/index.md | 4 + content/commands/ft.cursor-read/index.md | 4 + content/commands/ft.dictadd/index.md | 3 + content/commands/ft.dictdel/index.md | 3 + content/commands/ft.dictdump/index.md | 3 + content/commands/ft.dropindex/index.md | 5 + content/commands/ft.explain/index.md | 3 + content/commands/ft.explaincli/index.md | 3 + content/commands/ft.info/index.md | 3 + content/commands/ft.profile/index.md | 4 + content/commands/ft.search/index.md | 10 +- content/commands/ft.spellcheck/index.md | 3 + content/commands/ft.sugadd/index.md | 4 + content/commands/ft.sugdel/index.md | 4 + content/commands/ft.sugget/index.md | 4 + content/commands/ft.suglen/index.md | 4 + content/commands/ft.syndump/index.md | 3 + content/commands/ft.synupdate/index.md | 3 + content/commands/ft.tagvals/index.md | 7 + content/commands/json.arrappend/index.md | 4 + content/commands/json.arrindex/index.md | 4 + content/commands/json.arrinsert/index.md | 4 + content/commands/json.arrlen/index.md | 4 + content/commands/json.arrpop/index.md | 4 + content/commands/json.arrtrim/index.md | 4 + content/commands/json.clear/index.md | 4 + content/commands/json.debug-memory/index.md | 3 + content/commands/json.del/index.md | 4 + content/commands/json.forget/index.md | 4 + content/commands/json.get/index.md | 4 + content/commands/json.merge/index.md | 4 + content/commands/json.mget/index.md | 4 + content/commands/json.mset/index.md | 4 + content/commands/json.numincrby/index.md | 4 + content/commands/json.nummultby/index.md | 4 + content/commands/json.objkeys/index.md | 4 + content/commands/json.objlen/index.md | 4 + content/commands/json.resp/index.md | 4 + content/commands/json.set/index.md | 4 + content/commands/json.strappend/index.md | 4 + content/commands/json.strlen/index.md | 4 + content/commands/json.toggle/index.md | 4 + content/commands/json.type/index.md | 4 + content/commands/tdigest.add/index.md | 4 + content/commands/tdigest.byrank/index.md | 3 + content/commands/tdigest.byrevrank/index.md | 3 + content/commands/tdigest.cdf/index.md | 3 + content/commands/tdigest.create/index.md | 3 + content/commands/tdigest.info/index.md | 3 + content/commands/tdigest.max/index.md | 4 + content/commands/tdigest.merge/index.md | 4 + content/commands/tdigest.min/index.md | 4 + content/commands/tdigest.quantile/index.md | 3 + content/commands/tdigest.rank/index.md | 3 + content/commands/tdigest.reset/index.md | 4 + content/commands/tdigest.revrank/index.md | 3 + .../commands/tdigest.trimmed_mean/index.md | 3 + content/commands/topk.add/index.md | 4 + content/commands/topk.count/index.md | 4 + content/commands/topk.incrby/index.md | 4 + content/commands/topk.info/index.md | 4 + content/commands/topk.list/index.md | 4 + content/commands/topk.query/index.md | 4 + content/commands/topk.reserve/index.md | 4 + content/commands/ts.add/index.md | 4 + content/commands/ts.alter/index.md | 4 + content/commands/ts.create/index.md | 4 + content/commands/ts.createrule/index.md | 4 + content/commands/ts.decrby/index.md | 4 + content/commands/ts.del/index.md | 4 + content/commands/ts.deleterule/index.md | 4 + content/commands/ts.get/index.md | 4 + content/commands/ts.incrby/index.md | 4 + content/commands/ts.info/index.md | 4 + content/commands/ts.madd/index.md | 4 + content/commands/ts.mget/index.md | 11 +- content/commands/ts.mrange/index.md | 11 +- content/commands/ts.mrevrange/index.md | 11 +- content/commands/ts.queryindex/index.md | 6 +- content/commands/ts.range/index.md | 4 + content/commands/ts.revrange/index.md | 4 + .../data-types/probabilistic/configuration.md | 4 +- .../oss_and_stack/management/security/acl.md | 164 ++++++++++-------- 122 files changed, 578 insertions(+), 82 deletions(-) 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 35917fbf31..92a95edcba 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 0dda1a8a69..d7ae2fc8a9 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 68cbd56ad9..27eff4b5c4 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 105b684e45..f6c95932c3 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 242d504f1d..cb922d223f 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 34ba5597cc..3190015a83 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 37836b6d60..1585623dd9 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 86d48656a5..9b3d88ee33 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 69c1a38843..c1e3f3b1b8 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 6c2264016a..4695727c6f 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 b9a4e73257..c29d2633eb 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 802a5af3b5..06195d819d 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 e9295256b6..dd98c5125b 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 3d8d9e6f0a..ab7d045c86 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 d9084ab579..c78a2a7000 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 8a3920c682..3744463229 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 d53f24d372..2c6b37be49 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/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..8bfc8ff131 100644 --- a/content/commands/ft._list/index.md +++ b/content/commands/ft._list/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@admin' +- '@slow' categories: - docs - develop diff --git a/content/commands/ft.aggregate/index.md b/content/commands/ft.aggregate/index.md index 87cbc7a5db..4a44fa3d84 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 @@ -196,7 +200,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 0f07d30888..41d860d361 100644 --- a/content/commands/ft.aliasadd/index.md +++ b/content/commands/ft.aliasadd/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasdel/index.md b/content/commands/ft.aliasdel/index.md index bc24c5e871..c7c19bb6c9 100644 --- a/content/commands/ft.aliasdel/index.md +++ b/content/commands/ft.aliasdel/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasupdate/index.md b/content/commands/ft.aliasupdate/index.md index 7b747fc18f..cfc3ad044a 100644 --- a/content/commands/ft.aliasupdate/index.md +++ b/content/commands/ft.aliasupdate/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.alter/index.md b/content/commands/ft.alter/index.md index 4a9dc9843d..dc7ddcbefa 100644 --- a/content/commands/ft.alter/index.md +++ b/content/commands/ft.alter/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.config-get/index.md b/content/commands/ft.config-get/index.md index f000e44b4e..e509ada627 100644 --- a/content/commands/ft.config-get/index.md +++ b/content/commands/ft.config-get/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@search' arguments: - name: option type: string diff --git a/content/commands/ft.config-help/index.md b/content/commands/ft.config-help/index.md index 0ad6f7c7b0..67dda6a94a 100644 --- a/content/commands/ft.config-help/index.md +++ b/content/commands/ft.config-help/index.md @@ -1,4 +1,6 @@ --- +acl_categories: +- '@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 4c100b117b..47b422469a 100644 --- a/content/commands/ft.config-set/index.md +++ b/content/commands/ft.config-set/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@admin' +- '@fast' arguments: - name: option type: string diff --git a/content/commands/ft.create/index.md b/content/commands/ft.create/index.md index 574a520376..3289a9b354 100644 --- a/content/commands/ft.create/index.md +++ b/content/commands/ft.create/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.cursor-del/index.md b/content/commands/ft.cursor-del/index.md index 39a0c66000..cfa2b41594 100644 --- a/content/commands/ft.cursor-del/index.md +++ b/content/commands/ft.cursor-del/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.cursor-read/index.md b/content/commands/ft.cursor-read/index.md index d7e1894ae8..a7842a16fe 100644 --- a/content/commands/ft.cursor-read/index.md +++ b/content/commands/ft.cursor-read/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.dictadd/index.md b/content/commands/ft.dictadd/index.md index ac376b8718..e28b20f3fe 100644 --- a/content/commands/ft.dictadd/index.md +++ b/content/commands/ft.dictadd/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdel/index.md b/content/commands/ft.dictdel/index.md index e28f502c2a..5f5b8ddc52 100644 --- a/content/commands/ft.dictdel/index.md +++ b/content/commands/ft.dictdel/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdump/index.md b/content/commands/ft.dictdump/index.md index 2e0717029d..7b3b569a44 100644 --- a/content/commands/ft.dictdump/index.md +++ b/content/commands/ft.dictdump/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@slow' arguments: - name: dict type: string diff --git a/content/commands/ft.dropindex/index.md b/content/commands/ft.dropindex/index.md index 20669b78e7..94e1effebf 100644 --- a/content/commands/ft.dropindex/index.md +++ b/content/commands/ft.dropindex/index.md @@ -1,4 +1,9 @@ --- +acl_categories: +- '@search' +- '@write' +- '@dangerous' +- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.explain/index.md b/content/commands/ft.explain/index.md index 334c3ab648..9e9fee2038 100644 --- a/content/commands/ft.explain/index.md +++ b/content/commands/ft.explain/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.explaincli/index.md b/content/commands/ft.explaincli/index.md index 3473547792..8105bb075d 100644 --- a/content/commands/ft.explaincli/index.md +++ b/content/commands/ft.explaincli/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.info/index.md b/content/commands/ft.info/index.md index 8810c278b4..20cad21ecc 100644 --- a/content/commands/ft.info/index.md +++ b/content/commands/ft.info/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.profile/index.md b/content/commands/ft.profile/index.md index 24b3df38eb..c44caac5af 100644 --- a/content/commands/ft.profile/index.md +++ b/content/commands/ft.profile/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.search/index.md b/content/commands/ft.search/index.md index 3f6d1e2a9b..e26af15e78 100644 --- a/content/commands/ft.search/index.md +++ b/content/commands/ft.search/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@slow' arguments: - name: index type: string @@ -312,7 +316,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 5bc61065d8..6345465462 100644 --- a/content/commands/ft.spellcheck/index.md +++ b/content/commands/ft.spellcheck/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.sugadd/index.md b/content/commands/ft.sugadd/index.md index f80ce1e201..26e5624bda 100644 --- a/content/commands/ft.sugadd/index.md +++ b/content/commands/ft.sugadd/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@write' +- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.sugdel/index.md b/content/commands/ft.sugdel/index.md index fc11d32410..79473d0307 100644 --- a/content/commands/ft.sugdel/index.md +++ b/content/commands/ft.sugdel/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@write' +- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.sugget/index.md b/content/commands/ft.sugget/index.md index cedef2bc80..cf913456ad 100644 --- a/content/commands/ft.sugget/index.md +++ b/content/commands/ft.sugget/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.suglen/index.md b/content/commands/ft.suglen/index.md index c160b55b03..714c0845e7 100644 --- a/content/commands/ft.suglen/index.md +++ b/content/commands/ft.suglen/index.md @@ -1,4 +1,8 @@ --- +acl_categories: +- '@search' +- '@read' +- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.syndump/index.md b/content/commands/ft.syndump/index.md index b4402f8474..394dfc38e0 100644 --- a/content/commands/ft.syndump/index.md +++ b/content/commands/ft.syndump/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.synupdate/index.md b/content/commands/ft.synupdate/index.md index c74296b1ba..39a99c9afb 100644 --- a/content/commands/ft.synupdate/index.md +++ b/content/commands/ft.synupdate/index.md @@ -1,4 +1,7 @@ --- +acl_categories: +- '@search' +- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.tagvals/index.md b/content/commands/ft.tagvals/index.md index 5833bf0305..3da089a21b 100644 --- a/content/commands/ft.tagvals/index.md +++ b/content/commands/ft.tagvals/index.md @@ -1,4 +1,9 @@ --- +acl_categories: +- '@search' +- '@read' +- '@admin' +- '@dangerous' 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/json.arrappend/index.md b/content/commands/json.arrappend/index.md index a0e891363f..e3719dd610 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 244cdb7aa9..b5abf625f0 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 e2e207f0a7..7dab0cd161 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 ea9b3ffee9..35a9749ddd 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 738f3fb045..2ac7dcb50d 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 7b1803daad..4fadcf99a0 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 38cbb2a0b3..d6be009d34 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 74aba7dddd..20b1e0cede 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 3ac3cf7222..5b77cd040d 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 75627144ec..51b2185496 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 f587ae29ff..c7736157b5 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 618be439c3..e3388d505f 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 f4f0651b07..aeb41b0924 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 9777fe7e45..f7accf054b 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 b177fe791c..368d2a92fa 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 36967ba7c5..4b0c73a0bf 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 3aa3c8f2a3..c743ac3e56 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 e4506a5c78..ac69404d1a 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 f9ec57ed7e..107ad463be 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 d78d4c5d0f..406fe85292 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 e170431cec..08a50d3167 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 8604e4da77..4330f4d6e8 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 8b37b78571..4c8384f8db 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 aeaa843639..b79ea9830a 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/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 4563d30a67..89ec7be3ee 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 66aabcfd05..271481494e 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 af52b6045a..b969f26cf5 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 e6f72efcf3..e0bba44a59 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 a6d77e1146..49cfb5e942 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 4f8e02a39e..f362ce18b2 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 d9160ee7d0..ecd790c28d 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 a3d14de94e..6baeb1e492 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 22d13fe775..d22c6e01ad 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 28b14a25f7..cbd88a48ee 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 292eac9f00..2a79feb72a 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 3360b9c138..522e65d920 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 ff8b569c28..e877b4c23c 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 4db5f017a0..2524a253b5 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 3beca36378..ec8ee50725 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 0b5e999be0..6ac92bd355 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 4c28406456..7a9f6f0066 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/develop/data-types/probabilistic/configuration.md b/content/develop/data-types/probabilistic/configuration.md index c6baddae4d..62b59c1d51 100644 --- a/content/develop/data-types/probabilistic/configuration.md +++ b/content/develop/data-types/probabilistic/configuration.md @@ -59,11 +59,11 @@ Not optimizing a filter for its intended use will result in degradation of perfo ### bf-error-rate -Default error ratio for Bloom filters. +Default false positive rate for Bloom filters. Type: double -Valid range: `[0 .. 1]` +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` diff --git a/content/operate/oss_and_stack/management/security/acl.md b/content/operate/oss_and_stack/management/security/acl.md index bd2de467ff..d795623951 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. +* **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 From 28c02aab4f62cb19d8e1e89bafddfb1ff6da97fb Mon Sep 17 00:00:00 2001 From: Yuan Wang Date: Sat, 4 Jan 2025 01:01:07 +0800 Subject: [PATCH 06/32] async io threads (#1020) --- content/commands/client-list/index.md | 1 + content/commands/info/index.md | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) 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/info/index.md b/content/commands/info/index.md index 7f0d494ced..e45db6ac97 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 @@ -294,6 +295,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 @@ -357,8 +367,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 From 147d1fa6ed33cf6895b065842ec82e3ef2269441 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Fri, 14 Feb 2025 06:45:01 -0800 Subject: [PATCH 07/32] DEV: update ACL categories for search commands (#1165) --- content/commands/ft._list/index.md | 2 +- content/commands/ft.aliasadd/index.md | 1 - content/commands/ft.aliasdel/index.md | 1 - content/commands/ft.aliasupdate/index.md | 1 - content/commands/ft.alter/index.md | 1 - content/commands/ft.config-get/index.md | 1 + content/commands/ft.config-help/index.md | 1 + content/commands/ft.config-set/index.md | 3 +-- content/commands/ft.create/index.md | 1 - content/commands/ft.cursor-del/index.md | 3 +-- content/commands/ft.cursor-read/index.md | 3 +-- content/commands/ft.dictadd/index.md | 1 - content/commands/ft.dictdel/index.md | 1 - content/commands/ft.dictdump/index.md | 1 - content/commands/ft.dropindex/index.md | 5 ++--- content/commands/ft.explain/index.md | 1 - content/commands/ft.explaincli/index.md | 1 - content/commands/ft.info/index.md | 1 - content/commands/ft.profile/index.md | 3 +-- content/commands/ft.search/index.md | 3 +-- content/commands/ft.spellcheck/index.md | 1 - content/commands/ft.sugadd/index.md | 1 - content/commands/ft.sugdel/index.md | 1 - content/commands/ft.sugget/index.md | 2 -- content/commands/ft.suglen/index.md | 2 -- content/commands/ft.syndump/index.md | 1 - content/commands/ft.synupdate/index.md | 1 - content/commands/ft.tagvals/index.md | 6 +++--- 28 files changed, 13 insertions(+), 37 deletions(-) diff --git a/content/commands/ft._list/index.md b/content/commands/ft._list/index.md index 8bfc8ff131..8599080c2d 100644 --- a/content/commands/ft._list/index.md +++ b/content/commands/ft._list/index.md @@ -1,7 +1,7 @@ --- acl_categories: -- '@search' - '@admin' +- '@search' - '@slow' categories: - docs diff --git a/content/commands/ft.aliasadd/index.md b/content/commands/ft.aliasadd/index.md index 41d860d361..781d1ea32b 100644 --- a/content/commands/ft.aliasadd/index.md +++ b/content/commands/ft.aliasadd/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasdel/index.md b/content/commands/ft.aliasdel/index.md index c7c19bb6c9..4e940709f8 100644 --- a/content/commands/ft.aliasdel/index.md +++ b/content/commands/ft.aliasdel/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.aliasupdate/index.md b/content/commands/ft.aliasupdate/index.md index cfc3ad044a..71a0189cad 100644 --- a/content/commands/ft.aliasupdate/index.md +++ b/content/commands/ft.aliasupdate/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: alias type: string diff --git a/content/commands/ft.alter/index.md b/content/commands/ft.alter/index.md index dc7ddcbefa..4935cdb478 100644 --- a/content/commands/ft.alter/index.md +++ b/content/commands/ft.alter/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.config-get/index.md b/content/commands/ft.config-get/index.md index e509ada627..c67cc416e3 100644 --- a/content/commands/ft.config-get/index.md +++ b/content/commands/ft.config-get/index.md @@ -1,5 +1,6 @@ --- acl_categories: +- '@admin' - '@search' arguments: - name: option diff --git a/content/commands/ft.config-help/index.md b/content/commands/ft.config-help/index.md index 67dda6a94a..9705aab817 100644 --- a/content/commands/ft.config-help/index.md +++ b/content/commands/ft.config-help/index.md @@ -1,5 +1,6 @@ --- acl_categories: +- '@admin' - '@search' arguments: - name: option diff --git a/content/commands/ft.config-set/index.md b/content/commands/ft.config-set/index.md index 47b422469a..743f28d4eb 100644 --- a/content/commands/ft.config-set/index.md +++ b/content/commands/ft.config-set/index.md @@ -1,8 +1,7 @@ --- acl_categories: -- '@search' - '@admin' -- '@fast' +- '@search' arguments: - name: option type: string diff --git a/content/commands/ft.create/index.md b/content/commands/ft.create/index.md index 3289a9b354..0e497bf254 100644 --- a/content/commands/ft.create/index.md +++ b/content/commands/ft.create/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@slow' arguments: - name: index type: string diff --git a/content/commands/ft.cursor-del/index.md b/content/commands/ft.cursor-del/index.md index cfa2b41594..93914f64c8 100644 --- a/content/commands/ft.cursor-del/index.md +++ b/content/commands/ft.cursor-del/index.md @@ -1,8 +1,7 @@ --- acl_categories: -- '@search' - '@read' -- '@fast' +- '@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 a7842a16fe..3283e73c6c 100644 --- a/content/commands/ft.cursor-read/index.md +++ b/content/commands/ft.cursor-read/index.md @@ -1,8 +1,7 @@ --- acl_categories: -- '@search' - '@read' -- '@fast' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.dictadd/index.md b/content/commands/ft.dictadd/index.md index e28b20f3fe..77de4d6813 100644 --- a/content/commands/ft.dictadd/index.md +++ b/content/commands/ft.dictadd/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdel/index.md b/content/commands/ft.dictdel/index.md index 5f5b8ddc52..c6768f5c4a 100644 --- a/content/commands/ft.dictdel/index.md +++ b/content/commands/ft.dictdel/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: dict type: string diff --git a/content/commands/ft.dictdump/index.md b/content/commands/ft.dictdump/index.md index 7b3b569a44..e998a4cfe8 100644 --- a/content/commands/ft.dictdump/index.md +++ b/content/commands/ft.dictdump/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@slow' arguments: - name: dict type: string diff --git a/content/commands/ft.dropindex/index.md b/content/commands/ft.dropindex/index.md index 94e1effebf..f2c7aeae04 100644 --- a/content/commands/ft.dropindex/index.md +++ b/content/commands/ft.dropindex/index.md @@ -1,9 +1,9 @@ --- acl_categories: -- '@search' -- '@write' - '@dangerous' +- '@search' - '@slow' +- '@write' arguments: - name: index type: string @@ -88,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 9e9fee2038..490adf596d 100644 --- a/content/commands/ft.explain/index.md +++ b/content/commands/ft.explain/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.explaincli/index.md b/content/commands/ft.explaincli/index.md index 8105bb075d..1a737701c8 100644 --- a/content/commands/ft.explaincli/index.md +++ b/content/commands/ft.explaincli/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.info/index.md b/content/commands/ft.info/index.md index 20cad21ecc..9cc3ca2194 100644 --- a/content/commands/ft.info/index.md +++ b/content/commands/ft.info/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.profile/index.md b/content/commands/ft.profile/index.md index c44caac5af..84738f1e1d 100644 --- a/content/commands/ft.profile/index.md +++ b/content/commands/ft.profile/index.md @@ -1,8 +1,7 @@ --- acl_categories: -- '@search' - '@read' -- '@slow' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.search/index.md b/content/commands/ft.search/index.md index 4b69d5f8b7..a2530df834 100644 --- a/content/commands/ft.search/index.md +++ b/content/commands/ft.search/index.md @@ -1,8 +1,7 @@ --- acl_categories: -- '@search' - '@read' -- '@slow' +- '@search' arguments: - name: index type: string diff --git a/content/commands/ft.spellcheck/index.md b/content/commands/ft.spellcheck/index.md index 6345465462..5ce2472b7d 100644 --- a/content/commands/ft.spellcheck/index.md +++ b/content/commands/ft.spellcheck/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.sugadd/index.md b/content/commands/ft.sugadd/index.md index 26e5624bda..0c29357f6a 100644 --- a/content/commands/ft.sugadd/index.md +++ b/content/commands/ft.sugadd/index.md @@ -2,7 +2,6 @@ acl_categories: - '@search' - '@write' -- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.sugdel/index.md b/content/commands/ft.sugdel/index.md index 79473d0307..fb663e10e8 100644 --- a/content/commands/ft.sugdel/index.md +++ b/content/commands/ft.sugdel/index.md @@ -2,7 +2,6 @@ acl_categories: - '@search' - '@write' -- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.sugget/index.md b/content/commands/ft.sugget/index.md index cf913456ad..8043a5ac98 100644 --- a/content/commands/ft.sugget/index.md +++ b/content/commands/ft.sugget/index.md @@ -1,8 +1,6 @@ --- acl_categories: - '@search' -- '@read' -- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.suglen/index.md b/content/commands/ft.suglen/index.md index 714c0845e7..54eb1c4de5 100644 --- a/content/commands/ft.suglen/index.md +++ b/content/commands/ft.suglen/index.md @@ -1,8 +1,6 @@ --- acl_categories: - '@search' -- '@read' -- '@fast' arguments: - name: key type: string diff --git a/content/commands/ft.syndump/index.md b/content/commands/ft.syndump/index.md index 394dfc38e0..3c852a78ea 100644 --- a/content/commands/ft.syndump/index.md +++ b/content/commands/ft.syndump/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.synupdate/index.md b/content/commands/ft.synupdate/index.md index 39a99c9afb..7e76ea1f31 100644 --- a/content/commands/ft.synupdate/index.md +++ b/content/commands/ft.synupdate/index.md @@ -1,7 +1,6 @@ --- acl_categories: - '@search' -- '@fast' arguments: - name: index type: string diff --git a/content/commands/ft.tagvals/index.md b/content/commands/ft.tagvals/index.md index 3da089a21b..d52f734741 100644 --- a/content/commands/ft.tagvals/index.md +++ b/content/commands/ft.tagvals/index.md @@ -1,9 +1,9 @@ --- acl_categories: -- '@search' -- '@read' -- '@admin' - '@dangerous' +- '@read' +- '@search' +- '@slow' arguments: - name: index type: string From 42bfc367635fa5085a5632a3e7635f15d765230c Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Tue, 18 Feb 2025 10:58:46 -0800 Subject: [PATCH 08/32] DEV+OP: add CE8 changes to INFO cmd & Prometheus for RS pages (#1170) * DEV+OP: add CE8 changes to INFO cmd & Prometheus for RS pages * Apply review comments. Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> * Apply review comments. --------- Co-authored-by: andy-stark-redis <164213578+andy-stark-redis@users.noreply.github.com> --- content/commands/info/index.md | 20 +++++++++++++++++-- .../prometheus-metrics-definitions.md | 19 +++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index e62d2b7f50..09f1737937 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -507,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) @@ -540,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) @@ -556,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/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md index bcb3312d0f..dfc1aa5058 100644 --- a/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md +++ b/content/integrate/prometheus-with-redis-enterprise/prometheus-metrics-definitions.md @@ -174,6 +174,22 @@ The v2 metrics in the following tables are available as of Redis Enterprise Soft | 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) | @@ -219,4 +235,5 @@ The v2 metrics in the following tables are available as of Redis Enterprise Soft | 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 From b1e937ba27a77e013093ca439f37037d170ef90c Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Wed, 19 Feb 2025 09:58:08 -0800 Subject: [PATCH 09/32] DEV: collapse cmd categories and remove Stack from layouts and cmd pages (#1180) --- layouts/commands/list.html | 54 +++++++++++++++++------------------- layouts/commands/single.html | 5 ++-- 2 files changed, 27 insertions(+), 32 deletions(-) diff --git a/layouts/commands/list.html b/layouts/commands/list.html index 00ea315b15..9a7fffadaf 100644 --- a/layouts/commands/list.html +++ b/layouts/commands/list.html @@ -39,35 +39,31 @@

Commands

{{ $id }} {{ end */}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/layouts/commands/single.html b/layouts/commands/single.html index 1306fdb077..7dda1bf2b1 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:
From fc4dba519f59924c2efa3c12e342fcddb3b0f55f Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Fri, 21 Feb 2025 09:41:27 -0800 Subject: [PATCH 10/32] DEV: deprecate dialogs 1, 3, and 4; config. changes (#1197) --- .../administration/configuration.md | 42 +++++++++---------- .../advanced-concepts/dialects.md | 11 +++-- 2 files changed, 28 insertions(+), 25 deletions(-) diff --git a/content/develop/interact/search-and-query/administration/configuration.md b/content/develop/interact/search-and-query/administration/configuration.md index 048188c6f6..d83a9f2276 100644 --- a/content/develop/interact/search-and-query/administration/configuration.md +++ b/content/develop/interact/search-and-query/administration/configuration.md @@ -17,12 +17,12 @@ linkTitle: Configuration parameters title: Configuration parameters weight: 1 --- -{{{< note >}} -As of Redis Community Edition 8.0, configuration parameters for the time series data structure are now set in the following ways: +{{< 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, Redis CE 8.0 persists probabilistic configuration parameters just like any other configuration parameters (e.g., using the [`CONFIG REWRITE`]({{< baseurl >}}/commands/config-rewrite/) command). +Also, CE 8.0 persists probabilistic configuration parameters just like any other configuration parameters (e.g., using the [`CONFIG REWRITE`]({{< baseurl >}}/commands/config-rewrite/) command). {{< /note >}} ## Redis Query Engine configuration parameters @@ -39,28 +39,27 @@ The following table summarizes which configuration parameters can be set at run- | 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_NUMERIC_EMPTY_NODES | [search-fork-gc-clean-numeric-empty-nodes](#search-fork-gc-clean-numeric-empty-nodes) | :white_large_square: ||| | 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-forkgc-sleep-before-exit](#search-forkgc-sleep-before-exit) | :white_check_mark: ||| -| FRISOINI | [search-frisoini](#search-frisoini) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | -| GC_POLICY | [search-gc-policy](#search-gc-policy) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | -| GCSCANSIZE | [search-gc-scansize](#search-gc-scansize) | :white_large_square: | ✅ 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-searchresults](#search-max-searchresults) | :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-nogc](#search-nogc) | :white_large_square: | ✅ Supported

| ✅ Flexible & Annual
❌ Free & Fixed | +| 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: ||| @@ -74,10 +73,11 @@ The following table summarizes which configuration parameters can be set at run- | 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. | :white_large_square: ||| -| PRIVILEGED_THREADS_NUM | Deprecated in v8.0.0. | :white_large_square: ||| -| WORKER_THREADS | Deprecated in v8.0.0. | :white_large_square: ||| -| SAFEMODE | Deprecated in v1.6.0. This is now the default setting | :white_large_square: ||| +| 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. @@ -199,7 +199,7 @@ Valid range: `[1 .. 9,223,372,036,854,775,807]` Default: `30` -### search-forkgc-sleep-before-exit +### 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. @@ -209,7 +209,7 @@ Valid range: `[1 .. 9,223,372,036,854,775,807]` Default: `0` -### search-frisoini +### search-friso-ini If present, load the custom Chinese dictionary from the specified path. See [Using custom dictionaries]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/chinese#using-custom-dictionaries) for more details. @@ -217,13 +217,13 @@ Type: string Default: not set -### search-gc-policy +### 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 `search-gc-policy` is set to `FORK`, it can be combined with the `search-fork-gc-run-interval` and `search-fork-gc-retry-interval` settings. +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 @@ -231,7 +231,7 @@ Valid values: `FORK` or `DEFAULT` Default: `FORK` -### search-gc-scansize +### search-gc-scan-size The bulk size of the internal GC used for cleaning up indexes. @@ -306,7 +306,7 @@ Valid range: `[1 .. 9,223,372,036,854,775,807]` Default: `200` -### search-max-searchresults +### 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. @@ -383,7 +383,7 @@ Type: boolean Default: `FALSE` -### search-nogc +### search-no-gc If set to `TRUE`, garbage collection is disabled for all indexes. 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 d061f238e2..f429c0adbd 100644 --- a/content/develop/interact/search-and-query/advanced-concepts/dialects.md +++ b/content/develop/interact/search-and-query/advanced-concepts/dialects.md @@ -15,10 +15,13 @@ title: Query dialects weight: 5 --- -Redis Community Edition currently supports four query dialects for use with the [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/), [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/), and other Redis Query Engine commands. +Redis Community Edition (CE) currently supports four query dialects for use with the [`FT.SEARCH`]({{< baseurl >}}/commands/ft.search/), [`FT.AGGREGATE`]({{< baseurl >}}/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. @@ -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]({{< baseurl >}}/develop/interact/search-and-query/indexing/#index-json-arrays-as-text), [TAG]({{< baseurl >}}/develop/interact/search-and-query/indexing/#index-json-arrays-as-tag), [NUMERIC]({{< baseurl >}}/develop/interact/search-and-query/indexing/#index-json-arrays-as-numeric), [GEO]({{< baseurl >}}/develop/interact/search-and-query/indexing/#index-json-arrays-as-geo) and [VECTOR]({{< baseurl >}}/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`]({{< baseurl >}}/commands/ft.search/) and [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/). Apart from specifying `DIALECT 4` at the end of a [`FT.SEARCH`]({{< baseurl >}}/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. From 07d1b12eb63acf143a68c6e12fb073dc91d4c3d0 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Mon, 24 Feb 2025 14:10:05 -0800 Subject: [PATCH 11/32] DEV: update modules API docs for CE8 RC1 (#1207) --- .../reference/modules/modules-api-ref.md | 206 +++++++++++++++++- 1 file changed, 196 insertions(+), 10 deletions(-) diff --git a/content/develop/reference/modules/modules-api-ref.md b/content/develop/reference/modules/modules-api-ref.md index 6e233e3979..d5184e2564 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` @@ -7790,6 +7911,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 +7962,29 @@ 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 return non-NULL with a new pointer, +if the value was re-allocated to a different address. The callback also gets the key name just as a reference. + +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 +8016,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 +8081,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 +8153,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 +8180,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 +8214,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 +8251,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 +8375,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) + From 653b6cabc60beac7a725049d8cbdd7057b9dfd60 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Tue, 25 Feb 2025 07:09:07 -0800 Subject: [PATCH 12/32] DEV: add new HFE commands (#1204) --- content/commands/hgetdel/index.md | 88 +++++++++++++++++ content/commands/hgetdel/syntax.svg | 20 ++++ content/commands/hgetex/index.md | 127 ++++++++++++++++++++++++ content/commands/hgetex/syntax.svg | 20 ++++ content/commands/hsetex/index.md | 143 ++++++++++++++++++++++++++++ content/commands/hsetex/syntax.svg | 20 ++++ data/resp2_replies.json | 13 +++ data/resp3_replies.json | 13 +++ 8 files changed, 444 insertions(+) create mode 100644 content/commands/hgetdel/index.md create mode 100644 content/commands/hgetdel/syntax.svg create mode 100644 content/commands/hgetex/index.md create mode 100644 content/commands/hgetex/syntax.svg create mode 100644 content/commands/hsetex/index.md create mode 100644 content/commands/hsetex/syntax.svg 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..c4d75a03e8 --- /dev/null +++ b/content/commands/hgetex/index.md @@ -0,0 +1,127 @@ +--- +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 expirations (time-to-live or 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 field will expire, in seconds. +* `PXAT unix-time-milliseconds` -- Set the specified Unix time at which the field will expire, in milliseconds. +* `PERSIST` -- Remove the TTL associated with the field. + +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..5b3b1d7399 --- /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 expirations (time-to-live or 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 field will expire. +* `PXAT unix-time-milliseconds` -- Set the specified Unix time in milliseconds at which the field will expire. +* `KEEPTTL` -- Retain the TTL associated with the field. + +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/data/resp2_replies.json b/data/resp2_replies.json index 07a7cc52ed..a20316525b 100644 --- a/data/resp2_replies.json +++ b/data/resp2_replies.json @@ -575,6 +575,14 @@ "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." ], + "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 +656,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.", diff --git a/data/resp3_replies.json b/data/resp3_replies.json index 0a3692e4f5..b39f3e79cf 100644 --- a/data/resp3_replies.json +++ b/data/resp3_replies.json @@ -575,6 +575,14 @@ "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." ], + "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 +656,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.", From a4fa03caa88175a4c55f178d02e5a3eb84899133 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Tue, 25 Feb 2025 07:33:21 -0800 Subject: [PATCH 13/32] DEV: some corrections for the previous merge... (#1211) * DEV: add new HFE commands * DEV: correct previous merge --- content/commands/hgetex/index.md | 9 +++++---- content/commands/hsetex/index.md | 10 +++++----- data/resp2_replies.json | 10 +++++++++- data/resp3_replies.json | 10 +++++++++- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/content/commands/hgetex/index.md b/content/commands/hgetex/index.md index c4d75a03e8..355af773d7 100644 --- a/content/commands/hgetex/index.md +++ b/content/commands/hgetex/index.md @@ -88,7 +88,8 @@ syntax_str: "[EX\_seconds | PX\_milliseconds | EXAT\_unix-time-seconds | PXAT\_u \ | PERSIST] FIELDS\_numfields field [field ...]" title: HGETEX --- -Get the value of one or more fields of a given hash key and optionally set their expirations (time-to-live or TTL). + +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 @@ -96,9 +97,9 @@ 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 field will expire, in seconds. -* `PXAT unix-time-milliseconds` -- Set the specified Unix time at which the field will expire, in milliseconds. -* `PERSIST` -- Remove the TTL associated with the field. +* `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. diff --git a/content/commands/hsetex/index.md b/content/commands/hsetex/index.md index 5b3b1d7399..6393284d18 100644 --- a/content/commands/hsetex/index.md +++ b/content/commands/hsetex/index.md @@ -106,7 +106,8 @@ syntax_str: "[FNX | FXX] [EX\_seconds | PX\_milliseconds | EXAT\_unix-time-secon \ value ...]" title: HSETEX --- -Set the value of one or more fields of a given hash key, and optionally set their expirations (time-to-live or TTL). + +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 @@ -116,9 +117,9 @@ The `HGETEX` command supports a set of options: * `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 field will expire. -* `PXAT unix-time-milliseconds` -- Set the specified Unix time in milliseconds at which the field will expire. -* `KEEPTTL` -- Retain the TTL associated with the field. +* `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. @@ -140,4 +141,3 @@ redis> HTTL mykey FIELDS 2 field1 field2 1) (integer) 55481 2) (integer) 55481 ``` - diff --git a/data/resp2_replies.json b/data/resp2_replies.json index a20316525b..a2c3bafb37 100644 --- a/data/resp2_replies.json +++ b/data/resp2_replies.json @@ -573,7 +573,15 @@ "* [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." diff --git a/data/resp3_replies.json b/data/resp3_replies.json index b39f3e79cf..3f9321866d 100644 --- a/data/resp3_replies.json +++ b/data/resp3_replies.json @@ -573,7 +573,15 @@ "* [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." From 50f3ce9967235fda5c5751fb8c1bceef04caab4e Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Wed, 26 Feb 2025 10:06:53 -0800 Subject: [PATCH 14/32] DEV: update installation docs for CE8 (#1218) * DEV: initial commit of installation docs for CE8 * DEV: 2nd commit of installation docs for CE8 * DEV: 3rd commit of installation docs for CE8 --- content/get-started/_index.md | 10 +- .../operate/oss_and_stack/install/_index.md | 10 +- .../oss_and_stack/install/archive/_index.md | 22 ++++ .../{ => archive}/install-redis/_index.md | 8 +- .../install-redis-from-source.md | 2 +- .../install-redis/install-redis-on-linux.md | 2 +- .../install-redis/install-redis-on-mac-os.md | 4 +- .../install-redis/install-redis-on-windows.md | 4 +- .../install/archive/install-stack/_index.md | 16 +++ .../install/archive/install-stack/binaries.md | 49 +++++++ .../install/archive/install-stack/docker.md | 102 ++++++++++++++ .../{ => archive}/install-stack/linux.md | 2 +- .../{ => archive}/install-stack/mac-os.md | 2 +- .../install/archive/install-stack/windows.md | 20 +++ .../install/install-stack/_index.md | 11 +- .../install/install-stack/appimage.md | 59 +++++++++ .../install/install-stack/apt.md | 59 +++++++++ .../install/install-stack/binaries.md | 26 ++-- .../install/install-stack/docker.md | 10 +- .../install/install-stack/homebrew.md | 124 ++++++++++++++++++ .../install/install-stack/rpm.md | 42 ++++++ .../install/install-stack/snap.md | 60 +++++++++ .../install/install-stack/windows.md | 13 +- .../stack-with-enterprise/_index.md | 2 +- .../cli-utilities/redis-cli/_index.md | 2 +- .../cli-utilities/redis-cli/_index.md | 2 +- layouts/operate/list.html | 8 +- layouts/operate/single.html | 11 +- layouts/partials/docs-nav-int.html | 3 - 29 files changed, 614 insertions(+), 71 deletions(-) create mode 100644 content/operate/oss_and_stack/install/archive/_index.md rename content/operate/oss_and_stack/install/{ => archive}/install-redis/_index.md (96%) rename content/operate/oss_and_stack/install/{ => archive}/install-redis/install-redis-from-source.md (95%) rename content/operate/oss_and_stack/install/{ => archive}/install-redis/install-redis-on-linux.md (98%) rename content/operate/oss_and_stack/install/{ => archive}/install-redis/install-redis-on-mac-os.md (95%) rename content/operate/oss_and_stack/install/{ => archive}/install-redis/install-redis-on-windows.md (90%) create mode 100644 content/operate/oss_and_stack/install/archive/install-stack/_index.md create mode 100644 content/operate/oss_and_stack/install/archive/install-stack/binaries.md create mode 100644 content/operate/oss_and_stack/install/archive/install-stack/docker.md rename content/operate/oss_and_stack/install/{ => archive}/install-stack/linux.md (98%) rename content/operate/oss_and_stack/install/{ => archive}/install-stack/mac-os.md (98%) create mode 100644 content/operate/oss_and_stack/install/archive/install-stack/windows.md create mode 100644 content/operate/oss_and_stack/install/install-stack/appimage.md create mode 100644 content/operate/oss_and_stack/install/install-stack/apt.md create mode 100644 content/operate/oss_and_stack/install/install-stack/homebrew.md create mode 100644 content/operate/oss_and_stack/install/install-stack/rpm.md create mode 100644 content/operate/oss_and_stack/install/install-stack/snap.md 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/install/_index.md b/content/operate/oss_and_stack/install/_index.md index 54914f96f6..de529c2dcf 100644 --- a/content/operate/oss_and_stack/install/_index.md +++ b/content/operate/oss_and_stack/install/_index.md @@ -4,17 +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 Community Edition +title: Install Redis Community Edition (CE) weight: 30 --- -You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is 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 (via Docker only). Here are the installation instructions: -* [Install Redis]({{< relref "/operate/oss_and_stack/install/install-redis" >}}) +* [Install Redis CE]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) -While you can install Redis Community Edition 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..a326827944 --- /dev/null +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -0,0 +1,22 @@ +--- +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 +weight: 30 +bannerText: These docs apply to versions of Redis Community Edition earlier than 8.0.0. +bannerChildren: true +--- + +You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is available on Linux, macOS, and Windows (via Docker only). + +Here are the installation instructions: + +* [Install Redis]({{< relref "/operate/oss_and_stack/install/archive/install-redis" >}}) + +While you can install Redis Community Edition 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 Community Edition 8.0 is not yet available on Redis Cloud 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 96% 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 7b9768b8db..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 @@ -18,9 +18,9 @@ While you can install Redis on any of the platforms listed below, you might also 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 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. @@ -89,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" >}}). +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 f2dd26a8c3..5b9363bc88 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]({{< baseurl >}}/operate/oss_and_stack/install/install-redis/#install-redis-properly). +For a more complete installation, continue with [these instructions]({{< baseurl >}}/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/install-stack/_index.md b/content/operate/oss_and_stack/install/install-stack/_index.md index 91045561bf..798af729df 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 (via Docker only) +linkTitle: Install Redis CE stack: true -title: Install Redis Stack +title: Install Redis Community Edition weight: 2 +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..1336ce8cfa --- /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 via AppImage +linkTitle: AppImage +title: Install Redis Community Edition on Linux +weight: 5 +--- + +## Install Redis Community Edition (CE) on Ubuntu Linux via 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..42c29bb368 --- /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 via APT +linkTitle: APT +title: Install Redis Community Edition on Linux +weight: 2 +--- + +## Install Redis Community Edition (CE) on Ubuntu or Debian Linux via 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..abd6acf6d7 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, via [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..1c11703b4f 100644 --- a/content/operate/oss_and_stack/install/install-stack/docker.md +++ b/content/operate/oss_and_stack/install/install-stack/docker.md @@ -4,13 +4,15 @@ 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 + +To get started with Redis CE 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. 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..17cfd83b7b --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/homebrew.md @@ -0,0 +1,124 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition on macOS via Homebrew +linkTitle: Homebrew +title: Install Redis Community Edition on macOS +weight: 6 +--- + +## Install Redis Community Edition (CE) on macOS via 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 three brew casks available. + +* `redis-stack` contains both `redis-stack-server` and `redis-stack-redisinsight` casks. +* `redis-stack-server` provides Redis Stack server only. +* `redis-stack-redisinsight` contains Redis Insight. + +## Install using Homebrew + +First, tap the Redis CE Homebrew tap: + +{{< highlight bash >}} +brew tap redis-stack/redis-stack +{{< / highlight >}} + +Next, run `brew install`: + +{{< highlight bash >}} +brew install redis-stack +{{< / highlight >}} + +The `redis-stack-server` cask will install all Redis and Redis Stack binaries. How you run these binaries depends on whether you already have Redis installed on your system. + +### First-time Redis installation + +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 Stack 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 >}} + +Then, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If these directories are not in the output, see the "Existing Redis installation" instructions below. + +{{< note >}} +Because Redis Stack is installed using a brew cask via the `brew tap` command, it will not be integrated with the `brew services` command. +{{< /note >}} + +### Existing Redis installation + +If you have an existing Redis installation on your system, then might want to modify your `$PATH` to ensure that you're using the latest Redis Stack binaries. + +Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following lines. + +For Intel-based Macs: + +{{< highlight bash >}} +export PATH=/usr/local/Caskroom/redis-stack-server//bin:$PATH +{{< / highlight >}} + +For Apple silicon Macs: + +{{< highlight bash >}} +export PATH=/opt/homebrew/Caskroom/redis-stack-server//bin:$PATH +{{< / highlight >}} + +In both cases, replace `` with your version of Redis Stack. For example, with version 6.2.0, path is as follows: + +{{< highlight bash >}} +export PATH=/opt/homebrew/Caskroom/redis-stack-server/6.2.0/bin:$PATH +{{< / highlight >}} + +### Start Redis server + +You can now start Redis server as follows: + +{{< highlight bash >}} +redis-stack-server +{{< / highlight >}} + +## Uninstall Redis CE + +To uninstall Redis CE, run: + +{{< highlight bash >}} +brew uninstall redis-stack-redisinsight redis-stack-server redis-stack +brew untap redis-stack/redis-stack +{{< / highlight >}} + +## 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 >}} + +You can also test that your Redis server is running using +[Redis Insight]({{< relref "/develop/tools/insight" >}}). + +## 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" >}}) +* [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/rpm.md b/content/operate/oss_and_stack/install/install-stack/rpm.md new file mode 100644 index 0000000000..0368fed39e --- /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 via RPM +linkTitle: RPM +title: Install Redis Community Edition on Linux +weight: 3 +--- + +## Install Redis Community Edition (CE) on Red Hat, CentOS, or Rocky Linux via 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..6c6d9149e2 --- /dev/null +++ b/content/operate/oss_and_stack/install/install-stack/snap.md @@ -0,0 +1,60 @@ +--- +categories: +- docs +- operate +- stack +- oss +description: How to install Redis Community Edition via Snap +linkTitle: Snap +title: Install Redis Community Edition on Linux +weight: 4 +--- + +## Install Redis Community Edition (CE) on Ubuntu Linux via Snap + +First, download the latest Redis CE Snap package from [this page](https://redis.io/downloads/). + +To install, run: + +{{< highlight bash >}} +sudo apt update +sudo apt install redis-tools +sudo snap install --dangerous --classic +{{< / highlight >}} + +Redis will not start automatically, nor will it start at boot time. To start `redis-server` in the foreground, run the command: + +{{< highlight bash >}} +sudo snap run redis-server +{{< /highlight >}} + +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-server.service` file and enter the following information: + + {{< highlight text >}} + [Unit] + Description=Redis CE Server + After=network.target + + [Service] + ExecStart=/usr/bin/snap run redis-server + Restart=always + User=root + Group=root + + [Install] + WantedBy=multi-user.target + {{< /highlight >}} + +1. Run the following commands. + + {{< highlight bash >}} + sudo systemctl daemon-reload + sudo systemctl start redis-server + sudo systemctl enable redis-server + {{< /highlight >}} + +If your Linux distribution does not currently have Snap installed, you can install it using the instructions described [here](https://snapcraft.io/docs/installing-snapd). Then, download the appropriate from the [downloads page](https://redis.io/downloads/). 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/stack-with-enterprise/_index.md b/content/operate/oss_and_stack/stack-with-enterprise/_index.md index 99ff7f9c7f..a59112d542 100644 --- a/content/operate/oss_and_stack/stack-with-enterprise/_index.md +++ b/content/operate/oss_and_stack/stack-with-enterprise/_index.md @@ -7,7 +7,7 @@ categories: - stack description: null hideListLinks: false -linkTitle: Redis Community Edition and Redis Enterprise +linkTitle: Redis CE and Redis Enterprise weight: 70 aliases: - /operate/modules 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/layouts/operate/list.html b/layouts/operate/list.html index 476c4adf4f..6918f3c71d 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 2453cd5740..a2cded6da7 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 }} From 7093d3e1c7c48898b94c997914830c13a4dc0480 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Wed, 26 Feb 2025 12:54:31 -0800 Subject: [PATCH 15/32] Apply suggestions from code review Thank you, @mich-elle-luna! Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> --- content/commands/info/index.md | 2 +- content/commands/module-load/index.md | 2 +- content/develop/data-types/probabilistic/configuration.md | 2 +- .../interact/search-and-query/query-use-cases/_index.md | 2 +- .../develop/interact/search-and-query/query/geo-spatial.md | 2 +- content/operate/oss_and_stack/install/_index.md | 2 +- content/operate/oss_and_stack/install/archive/_index.md | 2 +- .../operate/oss_and_stack/install/install-stack/appimage.md | 4 ++-- content/operate/oss_and_stack/install/install-stack/apt.md | 2 +- .../operate/oss_and_stack/install/install-stack/homebrew.md | 4 ++-- content/operate/oss_and_stack/install/install-stack/rpm.md | 4 ++-- content/operate/oss_and_stack/install/install-stack/snap.md | 4 ++-- .../stack-with-enterprise/enterprise-capabilities.md | 1 - 13 files changed, 16 insertions(+), 17 deletions(-) diff --git a/content/commands/info/index.md b/content/commands/info/index.md index 09f1737937..5806e28086 100644 --- a/content/commands/info/index.md +++ b/content/commands/info/index.md @@ -520,7 +520,7 @@ The **modules** section contains additional information about loaded modules if * `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_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) diff --git a/content/commands/module-load/index.md b/content/commands/module-load/index.md index a20b4ea6a2..0cb5e4e034 100644 --- a/content/commands/module-load/index.md +++ b/content/commands/module-load/index.md @@ -49,5 +49,5 @@ unmodified to the module. configuration directive in `redis.conf`. {{< note >}} -As of Redis CE v8.0.0, loading a module via the Redis CLI with configuration parameters is deprecated. +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/develop/data-types/probabilistic/configuration.md b/content/develop/data-types/probabilistic/configuration.md index 62b59c1d51..be702f3c6a 100644 --- a/content/develop/data-types/probabilistic/configuration.md +++ b/content/develop/data-types/probabilistic/configuration.md @@ -25,7 +25,7 @@ Also, Redis CE 8.0 persists probabilistic configuration parameters just like any ## 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 +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 | | :------- | :------- | :------- | :------- | :------- | 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 5bd9f3f9a9..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 @@ -29,7 +29,7 @@ In geo-distributed search, hashes and JSON documents are handled in the usual [a **Unified search** -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 (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** 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 2e26fb83f4..fe70a72a1f 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 Community Edition'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: diff --git a/content/operate/oss_and_stack/install/_index.md b/content/operate/oss_and_stack/install/_index.md index de529c2dcf..a4a9c3ed42 100644 --- a/content/operate/oss_and_stack/install/_index.md +++ b/content/operate/oss_and_stack/install/_index.md @@ -11,7 +11,7 @@ title: Install Redis Community Edition (CE) weight: 30 --- -You can install [Redis CE]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis CE is available on Docker, Linux, macOS, and Windows (via Docker only). +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: diff --git a/content/operate/oss_and_stack/install/archive/_index.md b/content/operate/oss_and_stack/install/archive/_index.md index a326827944..945b784a2b 100644 --- a/content/operate/oss_and_stack/install/archive/_index.md +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -13,7 +13,7 @@ bannerText: These docs apply to versions of Redis Community Edition earlier than bannerChildren: true --- -You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is available on Linux, macOS, and Windows (via Docker only). +You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is available on Linux, macOS, and Windows (using Docker only). Here are the installation instructions: diff --git a/content/operate/oss_and_stack/install/install-stack/appimage.md b/content/operate/oss_and_stack/install/install-stack/appimage.md index 1336ce8cfa..27b31eb002 100644 --- a/content/operate/oss_and_stack/install/install-stack/appimage.md +++ b/content/operate/oss_and_stack/install/install-stack/appimage.md @@ -4,13 +4,13 @@ categories: - operate - stack - oss -description: How to install Redis Community Edition via AppImage +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 via AppImage +## Install Redis Community Edition (CE) on Ubuntu Linux using AppImage Fuse needs to be installed before proceeding. Install it as follows. diff --git a/content/operate/oss_and_stack/install/install-stack/apt.md b/content/operate/oss_and_stack/install/install-stack/apt.md index 42c29bb368..7eee7bd17c 100644 --- a/content/operate/oss_and_stack/install/install-stack/apt.md +++ b/content/operate/oss_and_stack/install/install-stack/apt.md @@ -4,7 +4,7 @@ categories: - operate - stack - oss -description: How to install Redis Community Edition via APT +description: How to install Redis Community Edition using APT linkTitle: APT title: Install Redis Community Edition on Linux weight: 2 diff --git a/content/operate/oss_and_stack/install/install-stack/homebrew.md b/content/operate/oss_and_stack/install/install-stack/homebrew.md index 17cfd83b7b..1fee1e3efc 100644 --- a/content/operate/oss_and_stack/install/install-stack/homebrew.md +++ b/content/operate/oss_and_stack/install/install-stack/homebrew.md @@ -4,13 +4,13 @@ categories: - operate - stack - oss -description: How to install Redis Community Edition on macOS via Homebrew +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 via Homebrew +## Install Redis Community Edition (CE) on macOS using Homebrew {{< note >}}Installation using Homebrew is only supported on macOS.{{< /note >}} diff --git a/content/operate/oss_and_stack/install/install-stack/rpm.md b/content/operate/oss_and_stack/install/install-stack/rpm.md index 0368fed39e..5266e0fc8e 100644 --- a/content/operate/oss_and_stack/install/install-stack/rpm.md +++ b/content/operate/oss_and_stack/install/install-stack/rpm.md @@ -4,13 +4,13 @@ categories: - operate - stack - oss -description: How to install Redis Community Edition via RPM +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 via RPM +## 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. diff --git a/content/operate/oss_and_stack/install/install-stack/snap.md b/content/operate/oss_and_stack/install/install-stack/snap.md index 6c6d9149e2..307086a8e2 100644 --- a/content/operate/oss_and_stack/install/install-stack/snap.md +++ b/content/operate/oss_and_stack/install/install-stack/snap.md @@ -4,13 +4,13 @@ categories: - operate - stack - oss -description: How to install Redis Community Edition via Snap +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 via Snap +## Install Redis Community Edition (CE) on Ubuntu Linux using Snap First, download the latest Redis CE Snap package from [this page](https://redis.io/downloads/). 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 1b516138ae..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 @@ -27,7 +27,6 @@ The following table shows which Redis CE features are supported by Redis Enterpr | [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 | -**DWD NOTE**: I think Graph, Triggers, and Gears should be removed from the above table. ## Feature compatibility From eee534f65e011a26baf91a866b4293654849183e Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 26 Feb 2025 13:54:03 -0800 Subject: [PATCH 16/32] Some more patching via to using --- content/operate/oss_and_stack/install/install-stack/_index.md | 2 +- content/operate/oss_and_stack/install/install-stack/apt.md | 2 +- .../operate/oss_and_stack/install/install-stack/binaries.md | 2 +- .../operate/oss_and_stack/install/install-stack/homebrew.md | 2 +- content/operate/oss_and_stack/management/config.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) 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 798af729df..1e53f5d768 100644 --- a/content/operate/oss_and_stack/install/install-stack/_index.md +++ b/content/operate/oss_and_stack/install/install-stack/_index.md @@ -4,7 +4,7 @@ categories: - operate - stack - oss -description: Install Redis Community Edition on Docker, Linux, macOS, and Windows (via Docker only) +description: Install Redis Community Edition on Docker, Linux, macOS, and Windows (using Docker only) linkTitle: Install Redis CE stack: true title: Install Redis Community Edition diff --git a/content/operate/oss_and_stack/install/install-stack/apt.md b/content/operate/oss_and_stack/install/install-stack/apt.md index 7eee7bd17c..588189824f 100644 --- a/content/operate/oss_and_stack/install/install-stack/apt.md +++ b/content/operate/oss_and_stack/install/install-stack/apt.md @@ -10,7 +10,7 @@ title: Install Redis Community Edition on Linux weight: 2 --- -## Install Redis Community Edition (CE) on Ubuntu or Debian Linux via APT +## 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: 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 abd6acf6d7..8daef2b615 100644 --- a/content/operate/oss_and_stack/install/install-stack/binaries.md +++ b/content/operate/oss_and_stack/install/install-stack/binaries.md @@ -40,7 +40,7 @@ If you have an existing Redis installation on your system, then you can choose t export PATH=/path/to/redis-server/bin/redis-server:$PATH {{< / highlight >}} -If you're running redis-server on macOS, 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 CE as follows: diff --git a/content/operate/oss_and_stack/install/install-stack/homebrew.md b/content/operate/oss_and_stack/install/install-stack/homebrew.md index 1fee1e3efc..f23e90c26e 100644 --- a/content/operate/oss_and_stack/install/install-stack/homebrew.md +++ b/content/operate/oss_and_stack/install/install-stack/homebrew.md @@ -52,7 +52,7 @@ echo $PATH Then, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If these directories are not in the output, see the "Existing Redis installation" instructions below. {{< note >}} -Because Redis Stack is installed using a brew cask via the `brew tap` command, it will not be integrated with the `brew services` command. +Because Redis Stack is installed using a brew cask with the `brew tap` command, it will not be integrated with the `brew services` command. {{< /note >}} ### Existing Redis installation 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 `--`. From 75edf8c8c0370b4697328ac125aa5da223870fa0 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 26 Feb 2025 14:30:40 -0800 Subject: [PATCH 17/32] Patch up botched merge text --- content/develop/data-types/timeseries/configuration.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/content/develop/data-types/timeseries/configuration.md b/content/develop/data-types/timeseries/configuration.md index a9bd3116e0..b245ab607b 100644 --- a/content/develop/data-types/timeseries/configuration.md +++ b/content/develop/data-types/timeseries/configuration.md @@ -64,9 +64,6 @@ Default: No compaction rules. **Discussion** -<<<<<<< HEAD -`COMPACTION_POLICY` has no effect on keys created with [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/). To understand the motivation for this behavior, consider the following scenario: Suppose a `COMPACTION_POLICY` is defined, but then one wants to manually create an additional compaction rule (using [`TS.CREATERULE`]({{< baseurl >}}/commands/ts.createrule/)) which requires first creating an empty destination key (using [`TS.CREATE`]({{< baseurl >}}/commands/ts.create/)). But now there is a problem: due to the `COMPACTION_POLICY`, automatic compactions would be undesirably created for that destination key. -======= #### Example ``` @@ -78,7 +75,6 @@ $ redis-server --loadmodule ./redistimeseries.so NUM_THREADS 3 Default compaction rules for newly created key with [`TS.ADD`]({{< baseurl >}}commands/ts.add/), [`TS.INCRBY`]({{< baseurl >}}commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}commands/ts.decrby/). Note that `COMPACTION_POLICY` has no effect on keys created with [`TS.CREATE`]({{< baseurl >}}commands/ts.create/). To understand the motivation for this behavior, consider the following scenario: Suppose a `COMPACTION_POLICY` is defined, but then one wants to manually create an additional compaction rule (using [`TS.CREATERULE`]({{< baseurl >}}commands/ts.createrule/)) which requires first creating an empty destination key (using [`TS.CREATE`]({{< baseurl >}}commands/ts.create/)). But now there is a problem: due to the `COMPACTION_POLICY`, automatic compactions would be undesirably created for that destination key. ->>>>>>> main Each rule is separated by a semicolon (`;`), the rule consists of multiple fields that are separated by a colon (`:`): From 36c239d2ed433382efe76ff0f3017d2aaa2993c0 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Wed, 26 Feb 2025 14:51:47 -0800 Subject: [PATCH 18/32] Remove more instances of Redis Stack --- content/develop/clients/_index.md | 4 ++-- content/develop/clients/dotnet/_index.md | 6 +++--- content/develop/clients/dotnet/queryjson.md | 2 +- content/develop/clients/go/_index.md | 3 +-- content/develop/clients/go/queryjson.md | 2 +- content/develop/clients/jedis/_index.md | 2 +- content/develop/clients/jedis/queryjson.md | 2 +- content/develop/clients/lettuce/_index.md | 2 +- content/develop/clients/nodejs/_index.md | 2 +- content/develop/clients/php/_index.md | 3 +-- content/develop/clients/php/queryjson.md | 2 +- content/develop/clients/redis-py/_index.md | 2 +- content/develop/clients/redis-py/queryjson.md | 2 +- content/develop/get-started/document-database.md | 2 +- .../basic-constructs/configuration-parameters.md | 2 +- content/develop/tools/insight/_index.md | 4 ++-- 16 files changed, 20 insertions(+), 22 deletions(-) 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 690f449a2e..310eebc95d 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/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 7f3b098216..20798449a9 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/get-started/document-database.md b/content/develop/get-started/document-database.md index 83295d80b5..c8b1d847c2 100644 --- a/content/develop/get-started/document-database.md +++ b/content/develop/get-started/document-database.md @@ -51,7 +51,7 @@ You can alternatively use the [installation guides]({{< relref "/operate/oss_and ## 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 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 875a54e1f0..a6fa92b92e 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/tools/insight/_index.md b/content/develop/tools/insight/_index.md index faf1716a7c..14cc1a16e2 100644 --- a/content/develop/tools/insight/_index.md +++ b/content/develop/tools/insight/_index.md @@ -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. From e3b8c6cf3cf6dd8e16cac1ab79e956fe73325899 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Thu, 27 Feb 2025 08:15:43 -0800 Subject: [PATCH 19/32] Apply code review comments --- content/develop/interact/search-and-query/_index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/develop/interact/search-and-query/_index.md b/content/develop/interact/search-and-query/_index.md index fe38879837..f211cbf847 100644 --- a/content/develop/interact/search-and-query/_index.md +++ b/content/develop/interact/search-and-query/_index.md @@ -57,6 +57,4 @@ The Redis Query Engine features of Redis are available under the Source Availabl 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. 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 From f409cdbfe60ca9a0182e0a1d5895eba96ac70cd5 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Thu, 13 Mar 2025 08:36:04 -0700 Subject: [PATCH 20/32] Add ACL info related to index creation --- content/operate/oss_and_stack/management/security/acl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/operate/oss_and_stack/management/security/acl.md b/content/operate/oss_and_stack/management/security/acl.md index 2f417b3ab2..21cc7578dd 100644 --- a/content/operate/oss_and_stack/management/security/acl.md +++ b/content/operate/oss_and_stack/management/security/acl.md @@ -311,7 +311,7 @@ The following is a list of command categories and their meanings: * **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. -* **search** - All search related commands. +* **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`. From 27e2ead63a7d32512474d3ca0c052ee358fb6fbb Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 18 Mar 2025 14:53:05 -0700 Subject: [PATCH 21/32] Replace instances of baseurl with relref --- .../data-types/probabilistic/configuration.md | 2 +- .../data-types/timeseries/configuration.md | 10 +- content/develop/data-types/vector-sets.md | 522 ++++++++++++++++++ .../administration/configuration.md | 22 +- 4 files changed, 539 insertions(+), 17 deletions(-) create mode 100644 content/develop/data-types/vector-sets.md diff --git a/content/develop/data-types/probabilistic/configuration.md b/content/develop/data-types/probabilistic/configuration.md index be702f3c6a..b931f42da4 100644 --- a/content/develop/data-types/probabilistic/configuration.md +++ b/content/develop/data-types/probabilistic/configuration.md @@ -19,7 +19,7 @@ As of Redis Community Edition (CE) 8.0, configuration parameters for the probabi * 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`]({{< baseurl >}}/commands/config-rewrite/) 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 >}} diff --git a/content/develop/data-types/timeseries/configuration.md b/content/develop/data-types/timeseries/configuration.md index c6f09f2986..bf311626c7 100644 --- a/content/develop/data-types/timeseries/configuration.md +++ b/content/develop/data-types/timeseries/configuration.md @@ -19,7 +19,7 @@ As of Redis Community Edition 8.0, configuration parameters for the time series * 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`]({{< baseurl >}}/commands/config-rewrite/) 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 @@ -56,7 +56,7 @@ Default: `4096` ### ts-compaction-policy -Default compaction rules for newly created keys with [`TS.ADD`]({{< baseurl >}}/commands/ts.add/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/). +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/" >}}). Type: string @@ -147,7 +147,7 @@ When a compaction policy is defined, compaction rules will be created automatica ### ts-duplicate-policy -The default policy for handling insertion ([`TS.ADD`]({{< baseurl >}}/commands/ts.add/) and [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/)) of multiple samples with identical timestamps, with one of the following values: +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 @@ -249,7 +249,7 @@ where `max_timestamp` is the timestamp of the sample with the largest timestamp ### ts-num-threads -The maximum number of per-shard threads for cross-key queries when using cluster mode ([`TS.MRANGE`]({{< baseurl >}}/commands/ts.mrange/), [`TS.MREVRANGE`]({{< baseurl >}}/commands/ts.mrevrange/), [`TS.MGET`]({{< baseurl >}}/commands/ts.mget/), and [`TS.QUERYINDEX`]({{< baseurl >}}/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! +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! Type: integer @@ -273,7 +273,7 @@ Valid range: `[0 .. 9,223,372,036,854,775,807]` Default: `0` -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`]({{< baseurl >}}/commands/ts.add/), [`TS.MADD`]({{< baseurl >}}/commands/ts.madd/), [`TS.INCRBY`]({{< baseurl >}}/commands/ts.incrby/), and [`TS.DECRBY`]({{< baseurl >}}/commands/ts.decrby/) calls. +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. The value `0` means no expiration. diff --git a/content/develop/data-types/vector-sets.md b/content/develop/data-types/vector-sets.md new file mode 100644 index 0000000000..0574df53ed --- /dev/null +++ b/content/develop/data-types/vector-sets.md @@ -0,0 +1,522 @@ +--- +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 +--- + +Vector sets are a data type similar to sorted sets, but having string elements that are associated with a vector instead of a score. +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 capabilities. It is possible to associate attributes to all or to a subset of elements in the set, and then, using the `FILTER` option of the `VSIM` command, to ask for items similar to a given vector but also passing a filter specified as a simple mathematical expression (Like `".year > 1950"` or similar). This means that **you can have vector similarity and scalar filters at the same time**. + +## Installation + +Build with: + + make + +Then load the module with the following command line, or by inserting the needed directives in the `redis.conf` file. + + ./redis-server --loadmodule vset.so + +To run tests, I suggest using this: + + ./redis-server --save "" --enable-debug-command yes + +The execute the tests with: + + ./test.py + +## Reference of available commands + +**VADD: add items into a vector set** + + VADD key [REDUCE dim] FP32|VALUES vector element [CAS] [NOQUANT | Q8 | BIN] + [EF build-exploration-factor] [SETATTR ] [M ] + +Add a new element into the vector set specified by the key. +The vector can be provided as FP32 blob of values, or as floating point +numbers as strings, prefixed by the number of elements (3 in the example): + + VADD mykey VALUES 3 0.1 1.2 0.5 my-element + +Meaning of the options: + +`REDUCE` implements random projection, in order to reduce the +dimensionality of the vector. The projection matrix is saved and reloaded +along with the vector set. + +`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` forces the vector to be created (in the first VADD call to a given key) without integer 8 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 has impacts on the recall quality. + +`Q8` forces the vector to use signed 8 bit quantization. This is the default, and the option only exists in order to make sure to check at insertion time if the vector set is of the same format. + +`EF` plays a role in the effort made to find good candidates when connecting the new node to the existing HNSW graph. The default is 200. Using a larger value, may help to have a better recall. To improve the recall it is also possible to increase `EF` during `VSIM` searches. + +`SETATTR` associates attributes to the newly created entry or update the entry attributes (if it already exists). It is the same as calling the `VSETATTR` attribute separately, so please check the documentation of that command in the filtered search section of this documentation. + +`M` defaults to 16 and is the HNSW famous `M` parameters. It is the maximum number of connections that each node of the graph have with other nodes: more connections mean more memory, but a better ability to explore the graph. Nodes at layer zero (every node exists at least at layer zero) have `M*2` connections, while the other layers only have `M` connections. This means that, for instance, an `M` of 64 will use at least 1024 bytes of memory for each node! That is, `64 links * 2 times * 8 bytes pointers`, and even more, since on average each node has something like 1.33 layers (but the other layers have just `M` connections, instead of `M*2`). If you don't have a recall quality problem, the default is fine, and uses a limited amount of memory. + +**VSIM: return elements by vector similarity** + + VSIM key [ELE|FP32|VALUES] [WITHSCORES] [COUNT num] [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] + +The command returns similar vectors, for simplicity (and verbosity) in the following example, instead of providing a vector using FP32 or VALUES (like in `VADD`), we will ask for elements having a vector similar to a given element already in the sorted set: + + > 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" + +It is possible to specify a `COUNT` and also to get the similarity score (from 1 to 0, where 1 is identical, 0 is opposite vector) between the query and the returned items. + + > VSIM word_embeddings ELE apple WITHSCORES COUNT 3 + 1) "apple" + 2) "0.9998867657923256" + 3) "apples" + 4) "0.8598527610301971" + 5) "pear" + 6) "0.8226882219314575" + +The `EF` argument is the exploration factor: the higher it is, the slower the command becomes, but the better the index is explored to find nodes that are near to our query. Sensible values are from 50 to 1000. + +The `TRUTH` option forces the command to perform a linear scan of all the entries inside the set, without using the graph search inside the HNSW, so it returns the best matching elements (the perfect result set) that can be used in order to easily calculate the recall. Of course the linear scan is `O(N)`, so it is much slower than the `log(N)` (considering a small `COUNT`) provided by the HNSW index. + +For `FILTER` and `FILTER-EF` options, please check the filtered search section of this documentation. + +**VDIM: return the dimension of the vectors inside the vector set** + + VDIM keyname + +Example: + + > VDIM word_embeddings + (integer) 300 + +Note that in the case of vectors that were populated using the `REDUCE` +option, for random projection, the vector set will report the size of +the projected (reduced) dimension. Yet the user should perform all the +queries using full-size vectors. + +**VCARD: return the number of elements in a vector set** + + VCARD key + +Example: + + > VCARD word_embeddings + (integer) 3000000 + + +**VREM: remove elements from vector set** + + VREM key element + +Example: + + > VADD vset VALUES 3 1 0 1 bar + (integer) 1 + > VREM vset bar + (integer) 1 + > VREM vset bar + (integer) 0 + +VREM does not perform thumstone / logical deletion, but will actually reclaim +the memory from the vector set, so it is save to add and remove elements +in a vector set in the context of long running applications that continuously +update the same index. + +**VEMB: return the approximated vector of an element** + + VEMB key element + +Example: + + > VEMB word_embeddings SQL + 1) "0.18208661675453186" + 2) "0.08535309880971909" + 3) "0.1365649551153183" + 4) "-0.16501599550247192" + 5) "0.14225517213344574" + ... 295 more elements ... + +Because vector sets perform insertion time normalization and optional +quantization, the returned vector could be approximated. `VEMB` will take +care to de-quantized and de-normalize the vector before returning it. + +It is possible to ask VEMB to return raw data, that is, the interal representation used by the vector: fp32, int8, or a bitmap for binary quantization. This behavior is triggered by the `RAW` option of of VEMB: + + VEMB word_embedding apple RAW + +In this case the return value of the command is an array of three or more elements: +1. The name of the quantization used, that is one of: "fp32", "bin", "q8". +2. The a string blob containing the raw data, 4 bytes fp32 floats for fp32, a bitmap for binary quants, or int8 bytes array for q8 quants. +3. A float representing the l2 of the vector before normalization. You need to multiply by this vector if you want to de-normalize the value for any reason. + +For q8 quantization, an additional elements is also returned: the quantization +range, so the integers from -127 to 127 represent (normalized) components +in the range `-range`, `+range`. + +**VLINKS: introspection command that shows neighbors for a node** + + VLINKS key element [WITHSCORES] + +The command reports the neighbors for each level. + +**VINFO: introspection command that shows info about a vector set** + + VINFO key + +Example: + + > 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 + +**VSETATTR: associate or remove the JSON attributes of elements** + + VSETATTR key element "{... json ...}" + +Each element of a vector set can be optionally associated with a JSON string +in order to use the `FILTER` option of `VSIM` to filter elements by scalars +(see the filtered search section for more information). This command can set, +update (if already set) or delete (if you set to an empty string) the +associated JSON attributes of an element. + +The command returns 0 if the element or the key don't exist, without +raising an error, otherwise 1 is returned, and the element attributes +are set or updated. + +**VGETATTR: retrieve the JSON attributes of elements** + + VGETATTR key element + +The command returns the JSON attribute associated with an element, or +null if there is no element associated, or no element at all, or no key. + +# Filtered search + +Each element of the vector set can be associated with a set of attributes specified as a JSON blob: + + > VADD vset VALUES 3 1 1 1 a SETATTR '{"year": 1950}' + (integer) 1 + > VADD vset VALUES 3 -1 -1 -1 b SETATTR '{"year": 1951}' + (integer) 1 + +Specifying an attribute with the `SETATTR` option of `VADD` is exactly equivalent to adding an element and then setting (or updating, if already set) the attributes JSON string. Also the symmetrical `VGETATTR` command returns the attribute associated to a given element. + + > VAD vset VALUES 3 0 1 0 c + (integer) 1 + > VSETATTR vset c '{"year": 1952}' + (integer) 1 + > VGETATTR vset c + "{\"year\": 1952}" + +At this point, I may use the FILTER option of VSIM to only ask for the subset of elements that are verified by my expression: + + > VSIM vset VALUES 3 0 0 0 FILTER '.year > 1950' + 1) "c" + 2) "b" + +The items will be returned again in order of similarity (most similar first), but only the items with the year field matching the expression is returned. + +The expressions are similar to what you would write inside the `if` statement of JavaScript or other familiar programming languages: you can use `and`, `or`, the obvious math operators like `+`, `-`, `/`, `>=`, `<`, ... and so forth (see the expressions section for more info). The selectors of the JSON object attributes start with a dot followed by the name of the key inside the JSON objects. + +Elements with invalid JSON or not having a given specified field **are considered as not matching** the expression, but will not generate any error at runtime. + +I'll draft the missing sections for the README following the style and format of the existing content. + +## FILTER expressions capabilities + +FILTER expressions allow you to perform complex filtering on vector similarity results using a JavaScript-like syntax. The expression is evaluated against each element's JSON attributes, with only elements that satisfy the expression being included in the results. + +### Expression Syntax + +Expressions support the following operators and capabilities: + +1. **Arithmetic operators**: `+`, `-`, `*`, `/`, `%` (modulo), `**` (exponentiation) +2. **Comparison operators**: `>`, `>=`, `<`, `<=`, `==`, `!=` +3. **Logical operators**: `and`/`&&`, `or`/`||`, `!`/`not` +4. **Containment operator**: `in` +5. **Parentheses** for grouping: `(...)` + +### Selector Notation + +Attributes are accessed using dot notation: + +- `.year` references the "year" attribute +- `.movie.year` would **NOT** reference the "year" field inside a "movie" object, only keys that are at the first level of the JSON object are accessible. + +### JSON and expressions data types + +Expressions can work with: + +- Numbers (dobule precision floats) +- Strings (enclosed in single or double quotes) +- Booleans (no native type: they are represented as 1 for true, 0 for false) +- Arrays (for use with the `in` operator: `value in [1, 2, 3]`) + +JSON attributes are converted in this way: + +- Numbers will be converted to numbers. +- Strings to strings. +- Booleans to 0 or 1 number. +- Arrays to tuples (for "in" operator), but only if composed of just numbers and strings. + +Any other type is ignored, and accessig it will make the expression evaluate to false. + +### Examples + +``` +# Find items from the 1980s +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.year >= 1980 and .year < 1990' + +# Find action movies with high ratings +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.genre == "action" and .rating > 8.0' + +# Find movies directed by either Spielberg or Nolan +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.director in ["Spielberg", "Nolan"]' + +# Complex condition with numerical operations +VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '(.year - 2000) ** 2 < 100 and .rating / 2 > 4' +``` + +### Error Handling + +Elements with any of the following conditions are considered not matching: +- Missing the queried JSON attribute +- Having invalid JSON in their attributes +- Having a JSON value that cannot be converted to the expected type + +This behavior allows you to safely filter on optional attributes without generating errors. + +### FILTER effort + +The `FILTER-EF` option controls the maximum effort spent when filtering vector search results. + +When performing vector similarity search with filtering, Vector Sets perform the standard similarity search as they apply the filter expression to each node. Since many results might be filtered out, Vector Sets may need to examine a lot more candidates than the requested `COUNT` to ensure sufficient matching results are returned. Actually, if the elements matching the filter are very rare or if there are less than elements matching than the specified count, this would trigger a full scan of the HNSW graph. + +For this reason, by default, the maximum effort is limited to a reasonable amount of nodes explored. + +### Modifying the FILTER effort + +1. By default, Vector Sets will explore up to `COUNT * 100` candidates to find matching results. +2. You can control this exploration with the `FILTER-EF` parameter. +3. A higher `FILTER-EF` value increases the chances of finding all relevant matches at the cost of increased processing time. +4. A `FILTER-EF` of zero will explore as many nodes as needed in order to actually return the number of elements specified by `COUNT`. +5. Even when a high `FILTER-EF` value is specified **the implementation will do a lot less work** if the elements passing the filter are very common, because of the early stop conditions of the HNSW implementation (once the specified amount of elements is reached and the quality check of the other candidates trigger an early stop). + +``` +VSIM key [ELE|FP32|VALUES] COUNT 10 FILTER '.year > 2000' FILTER-EF 500 +``` + +In this example, Vector Sets will examine up to 500 potential nodes. Of course if count is reached before exploring 500 nodes, and the quality checks show that it is not possible to make progresses on similarity, the search is ended sooner. + +### Performance Considerations + +- If you have highly selective filters (few items match), use a higher `FILTER-EF`, or just design your application in order to handle a result set that is smaller than the requested count. Note that anyway the additional elements may be too distant than the query vector. +- For less selective filters, the default should be sufficient. +- Very selective filters with low `FILTER-EF` values may return fewer items than requested. +- Extremely high values may impact performance without significantly improving results. + +The optimal `FILTER-EF` value depends on: +1. The selectivity of your filter. +2. The distribution of your data. +3. The required recall quality. + +A good practice is to start with the default and increase if needed when you observe fewer results than expected. + +### Testing a larg-ish data set + +To really see how things work at scale, you can [download](https://antirez.com/word2vec_with_attribs.rdb) the following dataset: + + wget https://antirez.com/word2vec_with_attribs.rdb + +It contains the 3 million words in Word2Vec having as attribute a JSON with just the length of the word. Because of the length distribution of words in large amounts of texts, where longer words become less and less common, this is ideal to check how filtering behaves with a filter verifying as true with less and less elements in a vector set. + +For instance: + + > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 6" + 1) "pastas" + 2) "rotini" + 3) "gnocci" + 4) "panino" + 5) "salads" + 6) "breads" + 7) "salame" + 8) "sauces" + 9) "cheese" + 10) "fritti" + +This will easily retrieve the desired amount of items (`COUNT` is 10 by default) since there are many items of length 6. However: + + > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 33" + 1) "skinless_boneless_chicken_breasts" + 2) "boneless_skinless_chicken_breasts" + 3) "Boneless_skinless_chicken_breasts" + +This time even if we asked for 10 items, we only get 3, since the default filter effort will be `10*100 = 1000`. We can tune this giving the effort in an explicit way, with the risk of our query being slower, of course: + + > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 33" FILTER-EF 10000 + 1) "skinless_boneless_chicken_breasts" + 2) "boneless_skinless_chicken_breasts" + 3) "Boneless_skinless_chicken_breasts" + 4) "mozzarella_feta_provolone_cheddar" + 5) "Greatfood.com_R_www.greatfood.com" + 6) "Pepperidge_Farm_Goldfish_crackers" + 7) "Prosecuted_Mobsters_Rebuilt_Dying" + 8) "Crispy_Snacker_Sandwiches_Popcorn" + 9) "risultati_delle_partite_disputate" + 10) "Peppermint_Mocha_Twist_Gingersnap" + +This time we get all the ten items, even if the last one will be quite far from our query vector. We encourage to experiment with this test dataset in order to understand better the dynamics of the implementation and the natural tradeoffs of filtered search. + +**Keep in mind** that by default, Redis Vector Sets will try to avoid a likely very useless huge scan of the HNSW graph, and will be more happy to return few or no elements at all, since this is almost always what the user actually wants in the context of retrieving *similar* items to the query. + +# Single Instance Scalability and Latency + +Vector Sets implement a threading model that allows Redis to handle many concurrent requests: by default `VSIM` is always threaded, and `VADD` is not (but can be partially threaded using the `CAS` option). This section explains how the threading and locking mechanisms work, and what to expect in terms of performance. + +## Threading Model + +- The `VSIM` command runs in a separate thread by default, allowing Redis to continue serving other commands. +- A maximum of 32 threads can run concurrently (defined by `HNSW_MAX_THREADS`). +- When this limit is reached, additional `VSIM` requests are queued - Redis remains responsive, no latency event is generated. +- The `VADD` command with the `CAS` option also leverages threading for the computation-heavy candidate search phase, but the insertion itself is performed in the main thread. `VADD` always runs in a sub-millisecond time, so this is not a source of latency, but having too many hundreds of writes per second can be challenging to handle with a single instance. Please, look at the next section about multiple instances scalability. +- Commands run within Lua scripts, MULTI/EXEC blocks, or from replication are executed in the main thread to ensure consistency. + +``` +> VSIM vset VALUES 3 1 1 1 FILTER '.year > 2000' # This runs in a thread. +> VADD vset VALUES 3 1 1 1 element CAS # Candidate search runs in a thread. +``` + +## Locking Mechanism + +Vector Sets use a read/write locking mechanism to coordinate access: + +- Reads (`VSIM`, `VEMB`, etc.) acquire a read lock, allowing multiple concurrent reads. +- Writes (`VADD`, `VREM`, etc.) acquire a write lock, temporarily blocking all reads. +- When a write lock is requested while reads are in progress, the write operation waits for all reads to complete. +- Once a write lock is granted, all reads are blocked until the write completes. +- Each thread has a dedicated slot for tracking visited nodes during graph traversal, avoiding contention. This improves performances but limits the maximum number of concurrent threads, since each node has a memory cost proportional to the number of slots. + +## DEL latency + +Deleting a very large vector set (millions of elements) can cause latency spikes, as deletion rebuilds connections between nodes. This may change in the future. +The deletion latency is most noticeable when using `DEL` on a key containing a large vector set or when the key expires. + +## Performance Characteristics + +- Search operations (`VSIM`) scale almost linearly with the number of CPU cores available, up to the thread limit. You can expect a Vector Set composed of million of items associated with components of dimension 300, with the default int8 quantization, to deliver around 50k VSIM operations per second in a single host. +- Insertion operations (`VADD`) are more computationally expensive than searches, and can't be threaded: expect much lower throughput, in the range of a few thousands inserts per second. +- Binary quantization offers significantly faster search performance at the cost of some recall quality, while int8 quantization, the default, seems to have very small impacts on recall quality, while it significantly improves performances and space efficiency. +- The `EF` parameter has a major impact on both search quality and performance - higher values mean better recall but slower searches. +- Graph traversal time scales logarithmically with the number of elements, making Vector Sets efficient even with millions of vectors + +## Loading / Saving performances + +Vector Sets are able to serialize on disk the graph structure as it is in memory, so loading back the data does not need to rebuild the HNSW graph. This means that Redis can load millions of items per minute. For instance 3 million items with 300 components vectors can be loaded back into memory into around 15 seconds. + +# Scaling vector sets to multiple instances + +The fundamental way vector sets can be scaled to very large data sets +and to many Redis instances is that a given very large set of vectors +can be partitioned into N different Redis keys, that can also live into +different Redis instances. + +For instance, I could add my elements into `key0`, `key1`, `key2`, by hashing +the item in some way, like doing `crc32(item)%3`, effectively splitting +the dataset into three different parts. However once I want all the vectors +of my dataset near to a given query vector, I could simply perform the +`VSIM` command against all the three keys, merging the results by +score (so the commands must be called using the `WITHSCORES` option) on +the client side: once the union of the results are ordered by the +similarity score, the query is equivalent to having a single key `key1+2+3` +containing all the items. + +There are a few interesting facts to note about this pattern: + +1. It is possible to have a logical sorted set that is as big as the sum of all the Redis instances we are using. +2. Deletion operations remain simple, we can hash the key and select the key where our item belongs. +3. However, even if I use 10 different Redis instances, I'm not going to reach 10x the **read** operations per second, compared to using a single server: for each logical query, I need to query all the instances. Yet, smaller graphs are faster to navigate, so there is some win even from the point of view of CPU usage. +4. Insertions, so **write** queries, will be scaled linearly: I can add N items against N instances at the same time, splitting the insertion load evenly. This is very important since vector sets, being based on HNSW data structures, are slower to add items than to query similar items, by a very big factor. +5. While it cannot guarantee always the best results, with proper timeout management this system may be considered *highly available*, since if a subset of N instances are reachable, I'll be still be able to return similar items to my query vector. + +Notably, this pattern can be implemented in a way that avoids paying the sum of the round trip time with all the servers: it is possible to send the queries at the same time to all the instances, so that latency will be equal the slower reply out of of the N servers queries. + +# Optimizing memory usage + +Vector Sets, or better, HNSWs, the underlying data structure used by Vector Sets, combined with the features provided by the Vector Sets themselves (quantization, random projection, filtering, ...) form an implementation that has a non-trivial space of parameters that can be tuned. Despite to the complexity of the implementation and of vector similarity problems, here there is a list of simple ideas that can drive the user to pick the best settings: + +* 8 bit quantization (the default) is almost always a win. It reduces the memory usage of vectors by a factor of 4, yet the performance penality in terms of recall is minimal. It also reduces insertion and search time by around 2 times or more. +* Binary quantization is much more extreme: it makes vector sets a lot faster, but increases the recall error in a sensible way, for instance from 95% to 80% if all the parameters remain the same. Yet, the speedup is really big, and the memory usage of vectors, compaerd to full precision vectors, 32 times smaller. +* Vectors memory usage are not the only responsible for Vector Set high memory usage per entry: nodes contain, on average `M*2 + M*0.33` pointers, where M is by default 16 (but can be tuned in `VADD`, see the `M` option). Also each node has the string item and the optional JSON attributes: those should be as small as possible in order to avoid contributing more to the memory usage. +* The `M` parameter should be incresed to 32 or more only when a near perfect recall is really needed. +* It is possible to gain space (less memory usage) sacrificing time (more CPU time) by using a low `M` (the default of 16, for instance) and a high `EF` (the effort parameter of `VSIM`) in order to scan the graph more deeply. +* When memory usage is seriosu concern, and there is the suspect the vectors we are storing don't contain as much information - at least for our use case - to justify the number of components they feature, random projection (the `REDUCE` option of `VADD`) could be tested to see if dimensionality reduction is possible with acceptable precision loss. + +# Vector Sets troubleshooting and understandability + +Vector graphs and similarity queries pose many challenges mainly due to the following three problems: + +1. The error due to the approximated nature of Vector Sets is hard to evaluate. +2. The error added by the quantization is often depends on the exact vector space (the embedding we are using **and** how far apart the elements we represent into such embeddings are). +3. We live in the illusion that learned embeddings capture the best similarity possible among elements, which is obviously not always true, and highly application dependent. + +The only way to debug such problems, is the ability to inspect step by step what is happening inside our application, and the structure of the HNSW graph itself. To do so, we suggest to consider the following tools: + +1. The `TRUTH` option of the `VSIM` command is able to return the ground truth of the most similar elements, without using the HNSW graph, but doing a linear scan. +2. The `VLINKS` command allows to explore the graph to see if the connections among nodes make sense, and to investigate why a given node may be more isolated than expected. Such command can also be used in a different way, when we want very fast "similar items" without paying the HNSW traversal time. It exploits the fact that we have a direct reference from each element in our vector set to each node in our HNSW graph. +3. The `WITHSCORES` option, in the supported commands, return a value that is directly related to the *cosine similarity* between the query and the items vectors, the interval of the similarity is simply rescaled from the -1, 1 original range to 0, 1, otherwise the metric is identical. + +# Known bugs + +* When `VADD` with `REDUCE` is replicated, we should probably send the replicas the random matrix, in order for `VEMB` to read the same things. This is not critical, because the behavior of `VADD` / `VSIM` should be transparent if you don't look at the transformed vectors, but still probably worth doing. +* Replication code is pretty much untested, and very vanilla (replicating the commands verbatim). + +# Implementation details + +Vector sets are based on the `hnsw.c` implementation of the HNSW data structure with extensions for speed and functionality. + +The main features are: + +* Proper nodes deletion with relinking. +* 8 bits and binary quantization. +* Threaded queries. +* Filtered search with predicate callback. diff --git a/content/develop/interact/search-and-query/administration/configuration.md b/content/develop/interact/search-and-query/administration/configuration.md index d83a9f2276..a08b44823b 100644 --- a/content/develop/interact/search-and-query/administration/configuration.md +++ b/content/develop/interact/search-and-query/administration/configuration.md @@ -22,7 +22,7 @@ As of Redis Community Edition (CE) 8.0, configuration parameters for the time se * 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`]({{< baseurl >}}/commands/config-rewrite/) 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 @@ -116,7 +116,7 @@ Default: `0` ### search-cursor-max-idle -The maximum idle time (in ms) that can be set to the [cursor api]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api). +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 @@ -144,7 +144,7 @@ Default: `1` The default [DIALECT]({{< relref "/develop/interact/search-and-query/advanced-concepts/dialects" >}}) -to be used by [`FT.CREATE`]({{< baseurl >}}/commands/ft.create/), [`FT.AGGREGATE`]({{< baseurl >}}/commands/ft.aggregate/), [`FT.EXPLAIN`]({{< baseurl >}}/commands/ft.explain/), [`FT.EXPLAINCLI`]({{< baseurl >}}/commands/ft.explaincli/), and [`FT.SPELLCHECK`]({{< baseurl >}}/commands/ft.spellcheck/). +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. @@ -211,7 +211,7 @@ Default: `0` ### search-friso-ini -If present, load the custom Chinese dictionary from the specified path. See [Using custom dictionaries]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/chinese#using-custom-dictionaries) for more details. +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 @@ -251,12 +251,12 @@ Redis Cloud defaults: 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`]({{< baseurl >}}/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. +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`]({{< baseurl >}}/commands/ft.cursor-del/) and/or [`MAXIDLE`]({{< baseurl >}}/commands/ft.aggregate/) prior to modifying `INDEX_CURSOR_LIMIT` -* See [Cursor API]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/aggregations#cursor-api) for more details. +* 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 @@ -490,11 +490,11 @@ 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]({{< baseurl >}}/commands/ft.create/) command page. +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`]({{< baseurl >}}/commands/ft.create/) command. +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** @@ -513,7 +513,7 @@ search-upgrade-index idx PREFIX 1 tt LANGUAGE french LANGUAGE_FIELD MyLang SCORE 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`]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/vectors/#creation-attributes-per-algorithm). +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 @@ -584,4 +584,4 @@ FT.CONFIG GET OPT1 FT.CONFIG GET * ``` -Values set using [`FT.CONFIG SET`]({{< baseurl >}}/commands/ft.config-set/) are not persisted after server restart. \ No newline at end of file +Values set using [`FT.CONFIG SET`]({{< relref "/commands/ft.config-set/" >}}) are not persisted after server restart. \ No newline at end of file From 144732294e5b7b0d7b8ba0c5160695be3bc7fe29 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Tue, 18 Mar 2025 15:07:27 -0700 Subject: [PATCH 22/32] Remove vector-set.md page (prematurely added) --- content/develop/data-types/vector-sets.md | 522 ---------------------- 1 file changed, 522 deletions(-) delete mode 100644 content/develop/data-types/vector-sets.md diff --git a/content/develop/data-types/vector-sets.md b/content/develop/data-types/vector-sets.md deleted file mode 100644 index 0574df53ed..0000000000 --- a/content/develop/data-types/vector-sets.md +++ /dev/null @@ -1,522 +0,0 @@ ---- -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 ---- - -Vector sets are a data type similar to sorted sets, but having string elements that are associated with a vector instead of a score. -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 capabilities. It is possible to associate attributes to all or to a subset of elements in the set, and then, using the `FILTER` option of the `VSIM` command, to ask for items similar to a given vector but also passing a filter specified as a simple mathematical expression (Like `".year > 1950"` or similar). This means that **you can have vector similarity and scalar filters at the same time**. - -## Installation - -Build with: - - make - -Then load the module with the following command line, or by inserting the needed directives in the `redis.conf` file. - - ./redis-server --loadmodule vset.so - -To run tests, I suggest using this: - - ./redis-server --save "" --enable-debug-command yes - -The execute the tests with: - - ./test.py - -## Reference of available commands - -**VADD: add items into a vector set** - - VADD key [REDUCE dim] FP32|VALUES vector element [CAS] [NOQUANT | Q8 | BIN] - [EF build-exploration-factor] [SETATTR ] [M ] - -Add a new element into the vector set specified by the key. -The vector can be provided as FP32 blob of values, or as floating point -numbers as strings, prefixed by the number of elements (3 in the example): - - VADD mykey VALUES 3 0.1 1.2 0.5 my-element - -Meaning of the options: - -`REDUCE` implements random projection, in order to reduce the -dimensionality of the vector. The projection matrix is saved and reloaded -along with the vector set. - -`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` forces the vector to be created (in the first VADD call to a given key) without integer 8 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 has impacts on the recall quality. - -`Q8` forces the vector to use signed 8 bit quantization. This is the default, and the option only exists in order to make sure to check at insertion time if the vector set is of the same format. - -`EF` plays a role in the effort made to find good candidates when connecting the new node to the existing HNSW graph. The default is 200. Using a larger value, may help to have a better recall. To improve the recall it is also possible to increase `EF` during `VSIM` searches. - -`SETATTR` associates attributes to the newly created entry or update the entry attributes (if it already exists). It is the same as calling the `VSETATTR` attribute separately, so please check the documentation of that command in the filtered search section of this documentation. - -`M` defaults to 16 and is the HNSW famous `M` parameters. It is the maximum number of connections that each node of the graph have with other nodes: more connections mean more memory, but a better ability to explore the graph. Nodes at layer zero (every node exists at least at layer zero) have `M*2` connections, while the other layers only have `M` connections. This means that, for instance, an `M` of 64 will use at least 1024 bytes of memory for each node! That is, `64 links * 2 times * 8 bytes pointers`, and even more, since on average each node has something like 1.33 layers (but the other layers have just `M` connections, instead of `M*2`). If you don't have a recall quality problem, the default is fine, and uses a limited amount of memory. - -**VSIM: return elements by vector similarity** - - VSIM key [ELE|FP32|VALUES] [WITHSCORES] [COUNT num] [EF search-exploration-factor] [FILTER expression] [FILTER-EF max-filtering-effort] [TRUTH] - -The command returns similar vectors, for simplicity (and verbosity) in the following example, instead of providing a vector using FP32 or VALUES (like in `VADD`), we will ask for elements having a vector similar to a given element already in the sorted set: - - > 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" - -It is possible to specify a `COUNT` and also to get the similarity score (from 1 to 0, where 1 is identical, 0 is opposite vector) between the query and the returned items. - - > VSIM word_embeddings ELE apple WITHSCORES COUNT 3 - 1) "apple" - 2) "0.9998867657923256" - 3) "apples" - 4) "0.8598527610301971" - 5) "pear" - 6) "0.8226882219314575" - -The `EF` argument is the exploration factor: the higher it is, the slower the command becomes, but the better the index is explored to find nodes that are near to our query. Sensible values are from 50 to 1000. - -The `TRUTH` option forces the command to perform a linear scan of all the entries inside the set, without using the graph search inside the HNSW, so it returns the best matching elements (the perfect result set) that can be used in order to easily calculate the recall. Of course the linear scan is `O(N)`, so it is much slower than the `log(N)` (considering a small `COUNT`) provided by the HNSW index. - -For `FILTER` and `FILTER-EF` options, please check the filtered search section of this documentation. - -**VDIM: return the dimension of the vectors inside the vector set** - - VDIM keyname - -Example: - - > VDIM word_embeddings - (integer) 300 - -Note that in the case of vectors that were populated using the `REDUCE` -option, for random projection, the vector set will report the size of -the projected (reduced) dimension. Yet the user should perform all the -queries using full-size vectors. - -**VCARD: return the number of elements in a vector set** - - VCARD key - -Example: - - > VCARD word_embeddings - (integer) 3000000 - - -**VREM: remove elements from vector set** - - VREM key element - -Example: - - > VADD vset VALUES 3 1 0 1 bar - (integer) 1 - > VREM vset bar - (integer) 1 - > VREM vset bar - (integer) 0 - -VREM does not perform thumstone / logical deletion, but will actually reclaim -the memory from the vector set, so it is save to add and remove elements -in a vector set in the context of long running applications that continuously -update the same index. - -**VEMB: return the approximated vector of an element** - - VEMB key element - -Example: - - > VEMB word_embeddings SQL - 1) "0.18208661675453186" - 2) "0.08535309880971909" - 3) "0.1365649551153183" - 4) "-0.16501599550247192" - 5) "0.14225517213344574" - ... 295 more elements ... - -Because vector sets perform insertion time normalization and optional -quantization, the returned vector could be approximated. `VEMB` will take -care to de-quantized and de-normalize the vector before returning it. - -It is possible to ask VEMB to return raw data, that is, the interal representation used by the vector: fp32, int8, or a bitmap for binary quantization. This behavior is triggered by the `RAW` option of of VEMB: - - VEMB word_embedding apple RAW - -In this case the return value of the command is an array of three or more elements: -1. The name of the quantization used, that is one of: "fp32", "bin", "q8". -2. The a string blob containing the raw data, 4 bytes fp32 floats for fp32, a bitmap for binary quants, or int8 bytes array for q8 quants. -3. A float representing the l2 of the vector before normalization. You need to multiply by this vector if you want to de-normalize the value for any reason. - -For q8 quantization, an additional elements is also returned: the quantization -range, so the integers from -127 to 127 represent (normalized) components -in the range `-range`, `+range`. - -**VLINKS: introspection command that shows neighbors for a node** - - VLINKS key element [WITHSCORES] - -The command reports the neighbors for each level. - -**VINFO: introspection command that shows info about a vector set** - - VINFO key - -Example: - - > 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 - -**VSETATTR: associate or remove the JSON attributes of elements** - - VSETATTR key element "{... json ...}" - -Each element of a vector set can be optionally associated with a JSON string -in order to use the `FILTER` option of `VSIM` to filter elements by scalars -(see the filtered search section for more information). This command can set, -update (if already set) or delete (if you set to an empty string) the -associated JSON attributes of an element. - -The command returns 0 if the element or the key don't exist, without -raising an error, otherwise 1 is returned, and the element attributes -are set or updated. - -**VGETATTR: retrieve the JSON attributes of elements** - - VGETATTR key element - -The command returns the JSON attribute associated with an element, or -null if there is no element associated, or no element at all, or no key. - -# Filtered search - -Each element of the vector set can be associated with a set of attributes specified as a JSON blob: - - > VADD vset VALUES 3 1 1 1 a SETATTR '{"year": 1950}' - (integer) 1 - > VADD vset VALUES 3 -1 -1 -1 b SETATTR '{"year": 1951}' - (integer) 1 - -Specifying an attribute with the `SETATTR` option of `VADD` is exactly equivalent to adding an element and then setting (or updating, if already set) the attributes JSON string. Also the symmetrical `VGETATTR` command returns the attribute associated to a given element. - - > VAD vset VALUES 3 0 1 0 c - (integer) 1 - > VSETATTR vset c '{"year": 1952}' - (integer) 1 - > VGETATTR vset c - "{\"year\": 1952}" - -At this point, I may use the FILTER option of VSIM to only ask for the subset of elements that are verified by my expression: - - > VSIM vset VALUES 3 0 0 0 FILTER '.year > 1950' - 1) "c" - 2) "b" - -The items will be returned again in order of similarity (most similar first), but only the items with the year field matching the expression is returned. - -The expressions are similar to what you would write inside the `if` statement of JavaScript or other familiar programming languages: you can use `and`, `or`, the obvious math operators like `+`, `-`, `/`, `>=`, `<`, ... and so forth (see the expressions section for more info). The selectors of the JSON object attributes start with a dot followed by the name of the key inside the JSON objects. - -Elements with invalid JSON or not having a given specified field **are considered as not matching** the expression, but will not generate any error at runtime. - -I'll draft the missing sections for the README following the style and format of the existing content. - -## FILTER expressions capabilities - -FILTER expressions allow you to perform complex filtering on vector similarity results using a JavaScript-like syntax. The expression is evaluated against each element's JSON attributes, with only elements that satisfy the expression being included in the results. - -### Expression Syntax - -Expressions support the following operators and capabilities: - -1. **Arithmetic operators**: `+`, `-`, `*`, `/`, `%` (modulo), `**` (exponentiation) -2. **Comparison operators**: `>`, `>=`, `<`, `<=`, `==`, `!=` -3. **Logical operators**: `and`/`&&`, `or`/`||`, `!`/`not` -4. **Containment operator**: `in` -5. **Parentheses** for grouping: `(...)` - -### Selector Notation - -Attributes are accessed using dot notation: - -- `.year` references the "year" attribute -- `.movie.year` would **NOT** reference the "year" field inside a "movie" object, only keys that are at the first level of the JSON object are accessible. - -### JSON and expressions data types - -Expressions can work with: - -- Numbers (dobule precision floats) -- Strings (enclosed in single or double quotes) -- Booleans (no native type: they are represented as 1 for true, 0 for false) -- Arrays (for use with the `in` operator: `value in [1, 2, 3]`) - -JSON attributes are converted in this way: - -- Numbers will be converted to numbers. -- Strings to strings. -- Booleans to 0 or 1 number. -- Arrays to tuples (for "in" operator), but only if composed of just numbers and strings. - -Any other type is ignored, and accessig it will make the expression evaluate to false. - -### Examples - -``` -# Find items from the 1980s -VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.year >= 1980 and .year < 1990' - -# Find action movies with high ratings -VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.genre == "action" and .rating > 8.0' - -# Find movies directed by either Spielberg or Nolan -VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '.director in ["Spielberg", "Nolan"]' - -# Complex condition with numerical operations -VSIM movies VALUES 3 0.5 0.8 0.2 FILTER '(.year - 2000) ** 2 < 100 and .rating / 2 > 4' -``` - -### Error Handling - -Elements with any of the following conditions are considered not matching: -- Missing the queried JSON attribute -- Having invalid JSON in their attributes -- Having a JSON value that cannot be converted to the expected type - -This behavior allows you to safely filter on optional attributes without generating errors. - -### FILTER effort - -The `FILTER-EF` option controls the maximum effort spent when filtering vector search results. - -When performing vector similarity search with filtering, Vector Sets perform the standard similarity search as they apply the filter expression to each node. Since many results might be filtered out, Vector Sets may need to examine a lot more candidates than the requested `COUNT` to ensure sufficient matching results are returned. Actually, if the elements matching the filter are very rare or if there are less than elements matching than the specified count, this would trigger a full scan of the HNSW graph. - -For this reason, by default, the maximum effort is limited to a reasonable amount of nodes explored. - -### Modifying the FILTER effort - -1. By default, Vector Sets will explore up to `COUNT * 100` candidates to find matching results. -2. You can control this exploration with the `FILTER-EF` parameter. -3. A higher `FILTER-EF` value increases the chances of finding all relevant matches at the cost of increased processing time. -4. A `FILTER-EF` of zero will explore as many nodes as needed in order to actually return the number of elements specified by `COUNT`. -5. Even when a high `FILTER-EF` value is specified **the implementation will do a lot less work** if the elements passing the filter are very common, because of the early stop conditions of the HNSW implementation (once the specified amount of elements is reached and the quality check of the other candidates trigger an early stop). - -``` -VSIM key [ELE|FP32|VALUES] COUNT 10 FILTER '.year > 2000' FILTER-EF 500 -``` - -In this example, Vector Sets will examine up to 500 potential nodes. Of course if count is reached before exploring 500 nodes, and the quality checks show that it is not possible to make progresses on similarity, the search is ended sooner. - -### Performance Considerations - -- If you have highly selective filters (few items match), use a higher `FILTER-EF`, or just design your application in order to handle a result set that is smaller than the requested count. Note that anyway the additional elements may be too distant than the query vector. -- For less selective filters, the default should be sufficient. -- Very selective filters with low `FILTER-EF` values may return fewer items than requested. -- Extremely high values may impact performance without significantly improving results. - -The optimal `FILTER-EF` value depends on: -1. The selectivity of your filter. -2. The distribution of your data. -3. The required recall quality. - -A good practice is to start with the default and increase if needed when you observe fewer results than expected. - -### Testing a larg-ish data set - -To really see how things work at scale, you can [download](https://antirez.com/word2vec_with_attribs.rdb) the following dataset: - - wget https://antirez.com/word2vec_with_attribs.rdb - -It contains the 3 million words in Word2Vec having as attribute a JSON with just the length of the word. Because of the length distribution of words in large amounts of texts, where longer words become less and less common, this is ideal to check how filtering behaves with a filter verifying as true with less and less elements in a vector set. - -For instance: - - > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 6" - 1) "pastas" - 2) "rotini" - 3) "gnocci" - 4) "panino" - 5) "salads" - 6) "breads" - 7) "salame" - 8) "sauces" - 9) "cheese" - 10) "fritti" - -This will easily retrieve the desired amount of items (`COUNT` is 10 by default) since there are many items of length 6. However: - - > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 33" - 1) "skinless_boneless_chicken_breasts" - 2) "boneless_skinless_chicken_breasts" - 3) "Boneless_skinless_chicken_breasts" - -This time even if we asked for 10 items, we only get 3, since the default filter effort will be `10*100 = 1000`. We can tune this giving the effort in an explicit way, with the risk of our query being slower, of course: - - > VSIM word_embeddings_bin ele "pasta" FILTER ".len == 33" FILTER-EF 10000 - 1) "skinless_boneless_chicken_breasts" - 2) "boneless_skinless_chicken_breasts" - 3) "Boneless_skinless_chicken_breasts" - 4) "mozzarella_feta_provolone_cheddar" - 5) "Greatfood.com_R_www.greatfood.com" - 6) "Pepperidge_Farm_Goldfish_crackers" - 7) "Prosecuted_Mobsters_Rebuilt_Dying" - 8) "Crispy_Snacker_Sandwiches_Popcorn" - 9) "risultati_delle_partite_disputate" - 10) "Peppermint_Mocha_Twist_Gingersnap" - -This time we get all the ten items, even if the last one will be quite far from our query vector. We encourage to experiment with this test dataset in order to understand better the dynamics of the implementation and the natural tradeoffs of filtered search. - -**Keep in mind** that by default, Redis Vector Sets will try to avoid a likely very useless huge scan of the HNSW graph, and will be more happy to return few or no elements at all, since this is almost always what the user actually wants in the context of retrieving *similar* items to the query. - -# Single Instance Scalability and Latency - -Vector Sets implement a threading model that allows Redis to handle many concurrent requests: by default `VSIM` is always threaded, and `VADD` is not (but can be partially threaded using the `CAS` option). This section explains how the threading and locking mechanisms work, and what to expect in terms of performance. - -## Threading Model - -- The `VSIM` command runs in a separate thread by default, allowing Redis to continue serving other commands. -- A maximum of 32 threads can run concurrently (defined by `HNSW_MAX_THREADS`). -- When this limit is reached, additional `VSIM` requests are queued - Redis remains responsive, no latency event is generated. -- The `VADD` command with the `CAS` option also leverages threading for the computation-heavy candidate search phase, but the insertion itself is performed in the main thread. `VADD` always runs in a sub-millisecond time, so this is not a source of latency, but having too many hundreds of writes per second can be challenging to handle with a single instance. Please, look at the next section about multiple instances scalability. -- Commands run within Lua scripts, MULTI/EXEC blocks, or from replication are executed in the main thread to ensure consistency. - -``` -> VSIM vset VALUES 3 1 1 1 FILTER '.year > 2000' # This runs in a thread. -> VADD vset VALUES 3 1 1 1 element CAS # Candidate search runs in a thread. -``` - -## Locking Mechanism - -Vector Sets use a read/write locking mechanism to coordinate access: - -- Reads (`VSIM`, `VEMB`, etc.) acquire a read lock, allowing multiple concurrent reads. -- Writes (`VADD`, `VREM`, etc.) acquire a write lock, temporarily blocking all reads. -- When a write lock is requested while reads are in progress, the write operation waits for all reads to complete. -- Once a write lock is granted, all reads are blocked until the write completes. -- Each thread has a dedicated slot for tracking visited nodes during graph traversal, avoiding contention. This improves performances but limits the maximum number of concurrent threads, since each node has a memory cost proportional to the number of slots. - -## DEL latency - -Deleting a very large vector set (millions of elements) can cause latency spikes, as deletion rebuilds connections between nodes. This may change in the future. -The deletion latency is most noticeable when using `DEL` on a key containing a large vector set or when the key expires. - -## Performance Characteristics - -- Search operations (`VSIM`) scale almost linearly with the number of CPU cores available, up to the thread limit. You can expect a Vector Set composed of million of items associated with components of dimension 300, with the default int8 quantization, to deliver around 50k VSIM operations per second in a single host. -- Insertion operations (`VADD`) are more computationally expensive than searches, and can't be threaded: expect much lower throughput, in the range of a few thousands inserts per second. -- Binary quantization offers significantly faster search performance at the cost of some recall quality, while int8 quantization, the default, seems to have very small impacts on recall quality, while it significantly improves performances and space efficiency. -- The `EF` parameter has a major impact on both search quality and performance - higher values mean better recall but slower searches. -- Graph traversal time scales logarithmically with the number of elements, making Vector Sets efficient even with millions of vectors - -## Loading / Saving performances - -Vector Sets are able to serialize on disk the graph structure as it is in memory, so loading back the data does not need to rebuild the HNSW graph. This means that Redis can load millions of items per minute. For instance 3 million items with 300 components vectors can be loaded back into memory into around 15 seconds. - -# Scaling vector sets to multiple instances - -The fundamental way vector sets can be scaled to very large data sets -and to many Redis instances is that a given very large set of vectors -can be partitioned into N different Redis keys, that can also live into -different Redis instances. - -For instance, I could add my elements into `key0`, `key1`, `key2`, by hashing -the item in some way, like doing `crc32(item)%3`, effectively splitting -the dataset into three different parts. However once I want all the vectors -of my dataset near to a given query vector, I could simply perform the -`VSIM` command against all the three keys, merging the results by -score (so the commands must be called using the `WITHSCORES` option) on -the client side: once the union of the results are ordered by the -similarity score, the query is equivalent to having a single key `key1+2+3` -containing all the items. - -There are a few interesting facts to note about this pattern: - -1. It is possible to have a logical sorted set that is as big as the sum of all the Redis instances we are using. -2. Deletion operations remain simple, we can hash the key and select the key where our item belongs. -3. However, even if I use 10 different Redis instances, I'm not going to reach 10x the **read** operations per second, compared to using a single server: for each logical query, I need to query all the instances. Yet, smaller graphs are faster to navigate, so there is some win even from the point of view of CPU usage. -4. Insertions, so **write** queries, will be scaled linearly: I can add N items against N instances at the same time, splitting the insertion load evenly. This is very important since vector sets, being based on HNSW data structures, are slower to add items than to query similar items, by a very big factor. -5. While it cannot guarantee always the best results, with proper timeout management this system may be considered *highly available*, since if a subset of N instances are reachable, I'll be still be able to return similar items to my query vector. - -Notably, this pattern can be implemented in a way that avoids paying the sum of the round trip time with all the servers: it is possible to send the queries at the same time to all the instances, so that latency will be equal the slower reply out of of the N servers queries. - -# Optimizing memory usage - -Vector Sets, or better, HNSWs, the underlying data structure used by Vector Sets, combined with the features provided by the Vector Sets themselves (quantization, random projection, filtering, ...) form an implementation that has a non-trivial space of parameters that can be tuned. Despite to the complexity of the implementation and of vector similarity problems, here there is a list of simple ideas that can drive the user to pick the best settings: - -* 8 bit quantization (the default) is almost always a win. It reduces the memory usage of vectors by a factor of 4, yet the performance penality in terms of recall is minimal. It also reduces insertion and search time by around 2 times or more. -* Binary quantization is much more extreme: it makes vector sets a lot faster, but increases the recall error in a sensible way, for instance from 95% to 80% if all the parameters remain the same. Yet, the speedup is really big, and the memory usage of vectors, compaerd to full precision vectors, 32 times smaller. -* Vectors memory usage are not the only responsible for Vector Set high memory usage per entry: nodes contain, on average `M*2 + M*0.33` pointers, where M is by default 16 (but can be tuned in `VADD`, see the `M` option). Also each node has the string item and the optional JSON attributes: those should be as small as possible in order to avoid contributing more to the memory usage. -* The `M` parameter should be incresed to 32 or more only when a near perfect recall is really needed. -* It is possible to gain space (less memory usage) sacrificing time (more CPU time) by using a low `M` (the default of 16, for instance) and a high `EF` (the effort parameter of `VSIM`) in order to scan the graph more deeply. -* When memory usage is seriosu concern, and there is the suspect the vectors we are storing don't contain as much information - at least for our use case - to justify the number of components they feature, random projection (the `REDUCE` option of `VADD`) could be tested to see if dimensionality reduction is possible with acceptable precision loss. - -# Vector Sets troubleshooting and understandability - -Vector graphs and similarity queries pose many challenges mainly due to the following three problems: - -1. The error due to the approximated nature of Vector Sets is hard to evaluate. -2. The error added by the quantization is often depends on the exact vector space (the embedding we are using **and** how far apart the elements we represent into such embeddings are). -3. We live in the illusion that learned embeddings capture the best similarity possible among elements, which is obviously not always true, and highly application dependent. - -The only way to debug such problems, is the ability to inspect step by step what is happening inside our application, and the structure of the HNSW graph itself. To do so, we suggest to consider the following tools: - -1. The `TRUTH` option of the `VSIM` command is able to return the ground truth of the most similar elements, without using the HNSW graph, but doing a linear scan. -2. The `VLINKS` command allows to explore the graph to see if the connections among nodes make sense, and to investigate why a given node may be more isolated than expected. Such command can also be used in a different way, when we want very fast "similar items" without paying the HNSW traversal time. It exploits the fact that we have a direct reference from each element in our vector set to each node in our HNSW graph. -3. The `WITHSCORES` option, in the supported commands, return a value that is directly related to the *cosine similarity* between the query and the items vectors, the interval of the similarity is simply rescaled from the -1, 1 original range to 0, 1, otherwise the metric is identical. - -# Known bugs - -* When `VADD` with `REDUCE` is replicated, we should probably send the replicas the random matrix, in order for `VEMB` to read the same things. This is not critical, because the behavior of `VADD` / `VSIM` should be transparent if you don't look at the transformed vectors, but still probably worth doing. -* Replication code is pretty much untested, and very vanilla (replicating the commands verbatim). - -# Implementation details - -Vector sets are based on the `hnsw.c` implementation of the HNSW data structure with extensions for speed and functionality. - -The main features are: - -* Proper nodes deletion with relinking. -* 8 bits and binary quantization. -* Threaded queries. -* Filtered search with predicate callback. From 8a7a5229f4a96ce335d92a6d2ab132fe34dea930 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 21 Mar 2025 08:53:52 -0700 Subject: [PATCH 23/32] Minor update to archived installation page --- .../operate/oss_and_stack/install/archive/_index.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content/operate/oss_and_stack/install/archive/_index.md b/content/operate/oss_and_stack/install/archive/_index.md index 945b784a2b..fb45c3a516 100644 --- a/content/operate/oss_and_stack/install/archive/_index.md +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -7,16 +7,17 @@ categories: description: How to install your preferred Redis flavor on your target platform hideListLinks: true linkTitle: Archived instructions -title: Install Redis Community Edition +title: Install Redis Community Edition or Redis Stack weight: 30 -bannerText: These docs apply to versions of Redis Community Edition earlier than 8.0.0. +bannerText: These docs apply to versions of Redis Community Edition and Redis Stack earlier than 8.0.0. bannerChildren: true --- -You can install [Redis Community Edition]({{< relref "/operate/oss_and_stack/" >}}) locally on your machine. Redis Community Edition is available on Linux, macOS, and Windows (using Docker only). +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]({{< relref "/operate/oss_and_stack/install/install-redis" >}}) +* [Install Redis Stack]({{< relref "/operate/oss_and_stack/install/install-stack" >}}) -While you can install Redis Community Edition 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 Community Edition 8.0 is not yet available on Redis Cloud +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). From fc80933cdcc5fc0c99c3e8da7ea5767419bdf409 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Tue, 1 Apr 2025 09:15:58 -0700 Subject: [PATCH 24/32] DEV: add build from source procedures (#1319) * DEV: add build from source procedures * Apply review comments; added AlmaLinux and Ubuntu (Focal) pages * Apply review comments; merged alma/rocky pages; added stubs for macOS * Added macOS 13/14 page * Apply code review comments and issues found whilst testing * Bug fix * Change titles per Lior * Remove bash requirement from alma/rocky; it's already there * Remove banner as instructs are complete --- .../oss_and_stack/install/archive/_index.md | 4 +- .../install/build-stack/_index.md | 14 ++ .../install/build-stack/almalinux-rocky-8.md | 184 ++++++++++++++++++ .../install/build-stack/almalinux-rocky-9.md | 182 +++++++++++++++++ .../install/build-stack/debian-bookworm.md | 113 +++++++++++ .../install/build-stack/debian-bullseye.md | 113 +++++++++++ .../install/build-stack/macos-13-14.md | 103 ++++++++++ .../install/build-stack/macos-15.md | 14 ++ .../install/build-stack/ubuntu-focal.md | 133 +++++++++++++ .../install/build-stack/ubuntu-jammy.md | 112 +++++++++++ .../install/build-stack/ubuntu-noble.md | 112 +++++++++++ .../install/install-stack/_index.md | 2 +- 12 files changed, 1083 insertions(+), 3 deletions(-) create mode 100644 content/operate/oss_and_stack/install/build-stack/_index.md create mode 100644 content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md create mode 100644 content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md create mode 100644 content/operate/oss_and_stack/install/build-stack/debian-bookworm.md create mode 100644 content/operate/oss_and_stack/install/build-stack/debian-bullseye.md create mode 100644 content/operate/oss_and_stack/install/build-stack/macos-13-14.md create mode 100644 content/operate/oss_and_stack/install/build-stack/macos-15.md create mode 100644 content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md create mode 100644 content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md create mode 100644 content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md diff --git a/content/operate/oss_and_stack/install/archive/_index.md b/content/operate/oss_and_stack/install/archive/_index.md index fb45c3a516..b8c76ce808 100644 --- a/content/operate/oss_and_stack/install/archive/_index.md +++ b/content/operate/oss_and_stack/install/archive/_index.md @@ -17,7 +17,7 @@ You can install [Redis](https://redis.io/about/) or [Redis Stack](https://redis. 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]({{< 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/build-stack/_index.md b/content/operate/oss_and_stack/install/build-stack/_index.md new file mode 100644 index 0000000000..f8f717a817 --- /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 Open Source on Linux and macOS +linkTitle: Build and run Redis Open Source +stack: true +title: Build and run Redis Open Source +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..c5374ccf0f --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-8.md @@ -0,0 +1,184 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: AlmaLinux/Rocky 8.10 +title: Build and run Redis Open Source on AlmaLinux/Rocky Linux 8.10 +weight: 5 +--- + +Follow the steps below to build and run Redis Open Source 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 <}} command and look for lines similar to the following: + +``` +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/almalinux-rocky-9.md b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md new file mode 100644 index 0000000000..2f4dc1576c --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/almalinux-rocky-9.md @@ -0,0 +1,182 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: AlmaLinux/Rocky 9.5 +title: Build and run Redis Open Source on AlmaLinux/Rocky Linux 9.5 +weight: 10 +--- + +Follow the steps below to build and run Redis Open Source 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 <}} command and look for lines similar to the following: + +``` +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/debian-bookworm.md b/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md new file mode 100644 index 0000000000..f2749b2d02 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md @@ -0,0 +1,113 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Debian 12 (Bookworm) +title: Build and run Redis Open Source on Debian 12 (Bookworm) +weight: 15 +--- + +Follow the steps below to build and run Redis Open Source 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 the Redis source code + +The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +## 3. Extract the source archive + +Create a directory for the source code and extract the contents into it: + +```bash +cd /usr/src +tar xvf redis.tar.gz +rm redis.tar.gz +``` + +## 4. 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 +sudo make install +``` + +This builds the Redis server, CLI, and any included modules. + +## 5. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +redis-server --version +redis-cli --version +``` + +## 6. Start Redis + +To start Redis, use the following command: + +```bash +redis-server /path/to/redis.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: + +``` +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/debian-bullseye.md b/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md new file mode 100644 index 0000000000..90d3323fd7 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md @@ -0,0 +1,113 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Debian 11 (Bullseye) +title: Build and run Redis Open Source on Debian 11 (Bullseye) +weight: 20 +--- + +Follow the steps below to build and run Redis Open Source 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 the Redis source code + +The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to `/usr/src`. + +## 3. Extract the source archive + +Create a directory for the source code and extract the contents into it: + +```bash +cd /usr/src +tar xvf redis.tar.gz +rm redis.tar.gz +``` + +## 4. 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 +sudo make install +``` + +This builds the Redis server, CLI, and any included modules. + +## 5. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +redis-server --version +redis-cli --version +``` + +## 6. Start Redis + +To start Redis, use the following command: + +```bash +redis-server /path/to/redis.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: + +``` +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-13-14.md b/content/operate/oss_and_stack/install/build-stack/macos-13-14.md new file mode 100644 index 0000000000..c9877b4af8 --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/macos-13-14.md @@ -0,0 +1,103 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: macOS 13 / macOS 14 +title: Build and run Redis Open Source on macOS 13 (Ventura) and macOS 14 (Sonoma) +weight: 50 +--- + +Follow the steps below to build and run Redis Open Source 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 [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Extract the source: + +```bash +tar xvf redis.tar.gz +``` + +## 5. Build 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 /path/to/redis.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: + +``` +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..537e55659b --- /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 Open Source on macOS 15 (Sequoia) +weight: 40 +--- + +Follow the steps below to build and run Redis Open Source 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..838a6f792a --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md @@ -0,0 +1,133 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 20.04 (Focal) +title: Build and run Redis Open Source on Ubuntu 20.04 (Focal) +weight: 25 +--- + +Follow the steps below to build and run Redis Open Source 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 the Redis source + +The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to /usr/src. + +## 5. Extract the source archive + +Create a directory for the source code and extract the contents into it: + +```bash +cd /usr/src +tar xvf redis.tar.gz +rm redis.tar.gz +``` + +## 6. 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 +sudo make install +``` + +## 7. (Optional) Verify the installation + +Confirm the Redis installation: + +```bash +redis-server --version +redis-cli --version +``` + +## 8. Start Redis + +To start Redis, use the following command: + +```bash +redis-server /path/to/redis.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: + +``` +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/ubuntu-jammy.md b/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md new file mode 100644 index 0000000000..842a4957be --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md @@ -0,0 +1,112 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 22.04 (Jammy) +title: Build and run Redis Open Source on Ubuntu 22.04 (Jammy) +weight: 30 +--- + +Follow the steps below to build and run Redis Open Source 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 the Redis source code + +The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to /usr/src. + +## 3. Extract the source archive + +Create a directory for the source code and extract the contents into it: + +```bash +cd /usr/src +tar xvf redis.tar.gz +rm redis.tar.gz +``` + +## 4. 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 +sudo make install +``` + +This builds the Redis server, CLI, and any included modules. + +## 5. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +redis-server --version +redis-cli --version +``` + +## 6. Start Redis + +To start Redis, use the following command: + +```bash +redis-server /path/to/redis.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: + +``` +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/ubuntu-noble.md b/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md new file mode 100644 index 0000000000..1617f2b67f --- /dev/null +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md @@ -0,0 +1,112 @@ +--- +categories: +- docs +- operate +- stack +- oss +linkTitle: Ubuntu 24.04 (Noble) +title: Build and run Redis Open Source on Ubuntu 24.04 (Noble) +weight: 35 +--- + +Follow the steps below to build and run Redis Open Source 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 the Redis source code + +The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). + +Copy the tar(1) file to /usr/src. + +## 3. Extract the source archive + +Create a directory for the source code and extract the contents into it: + +```bash +cd /usr/src +tar xvf redis.tar.gz +rm redis.tar.gz +``` + +## 4. 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 +sudo make install +``` + +This builds the Redis server, CLI, and any included modules. + +## 5. (Optional) Verify the installation + +You can confirm that Redis has been built and installed successfully by checking the version: + +```bash +redis-server --version +redis-cli --version +``` + +## 6. Start Redis + +To start Redis, use the following command: + +```bash +redis-server /path/to/redis.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: + +``` +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/install-stack/_index.md b/content/operate/oss_and_stack/install/install-stack/_index.md index 1e53f5d768..e4bd2f2079 100644 --- a/content/operate/oss_and_stack/install/install-stack/_index.md +++ b/content/operate/oss_and_stack/install/install-stack/_index.md @@ -8,7 +8,7 @@ description: Install Redis Community Edition on Docker, Linux, macOS, and Window linkTitle: Install Redis CE stack: true title: Install Redis Community Edition -weight: 2 +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 --- From 64525dd0ecbb72ed737592c736581b57ed01b31d Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Thu, 3 Apr 2025 09:13:49 -0700 Subject: [PATCH 25/32] DEV: point to GitHub for source downloads (#1358) * DEV: point to GitHub for source downloads * Adding the remaining pages * Finalize the build instructions --- .../install/build-stack/almalinux-rocky-8.md | 37 +++++++++----- .../install/build-stack/almalinux-rocky-9.md | 37 +++++++++----- .../install/build-stack/debian-bookworm.md | 48 +++++++++++------- .../install/build-stack/debian-bullseye.md | 47 +++++++++++------- .../install/build-stack/macos-13-14.md | 31 +++++++++--- .../install/build-stack/macos-15.md | 4 +- .../install/build-stack/ubuntu-focal.md | 49 ++++++++++++------- .../install/build-stack/ubuntu-jammy.md | 49 ++++++++++++------- .../install/build-stack/ubuntu-noble.md | 49 ++++++++++++------- 9 files changed, 233 insertions(+), 118 deletions(-) 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 index c5374ccf0f..04d29d2dd4 100644 --- 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 @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: AlmaLinux/Rocky 8.10 -title: Build and run Redis Open Source on AlmaLinux/Rocky Linux 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 Open Source from its source code on a system running AlmaLinux and Rocky Linux 8.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 8.10. {{< note >}} Docker images used to produce these build notes: @@ -122,16 +122,25 @@ cmake --version ## 4. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` ## 5. Build Redis @@ -140,7 +149,7 @@ 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 +cd /usr/src/redis- export BUILD_TLS=yes export BUILD_WITH_MODULES=yes @@ -148,7 +157,6 @@ export INSTALL_RUST_TOOLCHAIN=yes export DISABLE_WERRORS=yes make -j "$(nproc)" all -sudo make install ``` ## 6. (Optional) Verify the installation @@ -156,8 +164,8 @@ sudo make install Check the installed Redis server and CLI versions: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` ## 7. Start Redis @@ -165,13 +173,13 @@ redis-cli --version To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -182,3 +190,10 @@ 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 index 2f4dc1576c..f75aaab647 100644 --- 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 @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: AlmaLinux/Rocky 9.5 -title: Build and run Redis Open Source on AlmaLinux/Rocky Linux 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 Open Source from its source code on a system running AlmaLinux and Rocky Linux 9.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 9.5. {{< note >}} Docker images used to produce these build notes: @@ -120,16 +120,25 @@ cmake --version ## 4. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` ## 5. Build Redis @@ -138,7 +147,7 @@ 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 +cd /usr/src/redis- export BUILD_TLS=yes export BUILD_WITH_MODULES=yes @@ -146,7 +155,6 @@ export INSTALL_RUST_TOOLCHAIN=yes export DISABLE_WERRORS=yes make -j "$(nproc)" all -sudo make install ``` ## 6. (Optional) Verify the installation @@ -154,8 +162,8 @@ sudo make install Check that Redis was installed successfully: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` ## 7. Start Redis @@ -163,13 +171,13 @@ redis-cli --version To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -180,3 +188,10 @@ 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 index f2749b2d02..fbd8b48c9d 100644 --- a/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md +++ b/content/operate/oss_and_stack/install/build-stack/debian-bookworm.md @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: Debian 12 (Bookworm) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running Debian 12 (Bookworm). +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: @@ -47,60 +47,67 @@ sudo apt-get install -y --no-install-recommends \ libtool ``` -## 2. Download the Redis source code +## 2. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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`. -## 3. Extract the source archive +Alternatively, you can download the file directly using the `wget` command, as shown below. -Create a directory for the source code and extract the contents into it: +``` +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` -## 4. Build Redis + +## 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 +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 -sudo make install ``` This builds the Redis server, CLI, and any included modules. -## 5. (Optional) Verify the installation +## 4. (Optional) Verify the installation You can confirm that Redis has been built and installed successfully by checking the version: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` -## 6. Start Redis +## 5. Start Redis To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -111,3 +118,10 @@ 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 index 90d3323fd7..775df5615f 100644 --- a/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md +++ b/content/operate/oss_and_stack/install/build-stack/debian-bullseye.md @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: Debian 11 (Bullseye) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running Debian 11 (Bullseye). +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: @@ -47,60 +47,66 @@ sudo apt-get install -y --no-install-recommends \ libtool ``` -## 2. Download the Redis source code +## 2. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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`. -## 3. Extract the source archive +Alternatively, you can download the file directly using the `wget` command, as shown below. -Create a directory for the source code and extract the contents into it: +``` +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` -## 4. Build Redis +## 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 +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 -sudo make install ``` This builds the Redis server, CLI, and any included modules. -## 5. (Optional) Verify the installation +## 4. (Optional) Verify the installation You can confirm that Redis has been built and installed successfully by checking the version: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` -## 6. Start Redis +## 5. Start Redis To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -111,3 +117,10 @@ 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 index c9877b4af8..0c6ca0b189 100644 --- 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 @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: macOS 13 / macOS 14 -title: Build and run Redis Open Source on macOS 13 (Ventura) and macOS 14 (Sonoma) +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 Open Source from its source code on a system running macOS 13 (Ventura) and macOS 14 (Sonoma). +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 @@ -44,17 +44,36 @@ tar -xf ${RUST_INSTALLER}.tar.xz ## 4. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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 +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 @@ -84,13 +103,13 @@ 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 /path/to/redis.conf +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: ``` -redis-cli INFO +build_dir/bin/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] 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 index 537e55659b..e7dca10711 100644 --- a/content/operate/oss_and_stack/install/build-stack/macos-15.md +++ b/content/operate/oss_and_stack/install/build-stack/macos-15.md @@ -5,10 +5,10 @@ categories: - stack - oss linkTitle: macOS 15 (Sequoia) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running macOS 15 (Sequoia). +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 index 838a6f792a..cffb212a3a 100644 --- a/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-focal.md @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: Ubuntu 20.04 (Focal) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running Ubuntu 20.04 (Focal). +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: @@ -69,58 +69,64 @@ sudo ln -sf /usr/local/bin/cmake /usr/bin/cmake cmake --version ``` -## 4. Download the Redis source +## 4. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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. +Copy the tar(1) file to `/usr/src`. -## 5. Extract the source archive +Alternatively, you can download the file directly using the `wget` command, as shown below. -Create a directory for the source code and extract the contents into it: +``` +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` -## 6. Build Redis +## 5. Build Redis Set the necessary environment variables and compile Redis: ```bash -cd /usr/src/redis +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 -sudo make install ``` -## 7. (Optional) Verify the installation +## 6. (Optional) Verify the installation Confirm the Redis installation: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` -## 8. Start Redis +## 7. Start Redis To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -131,3 +137,10 @@ 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 index 842a4957be..a668f58b96 100644 --- a/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-jammy.md @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: Ubuntu 22.04 (Jammy) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running Ubuntu 22.04 (Jammy). +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: @@ -46,60 +46,66 @@ sudo apt-get install -y --no-install-recommends \ libtool ``` -## 2. Download the Redis source code +## 2. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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. +Copy the tar(1) file to `/usr/src`. -## 3. Extract the source archive +Alternatively, you can download the file directly using the `wget` command, as shown below. -Create a directory for the source code and extract the contents into it: +``` +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` -## 4. Build Redis +## 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 +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 -sudo make install ``` This builds the Redis server, CLI, and any included modules. -## 5. (Optional) Verify the installation +## 4. (Optional) Verify the installation You can confirm that Redis has been built and installed successfully by checking the version: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` -## 6. Start Redis +## 5. Start Redis To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -110,3 +116,10 @@ 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 index 1617f2b67f..69ba1facdb 100644 --- a/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md +++ b/content/operate/oss_and_stack/install/build-stack/ubuntu-noble.md @@ -5,11 +5,11 @@ categories: - stack - oss linkTitle: Ubuntu 24.04 (Noble) -title: Build and run Redis Open Source on 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 Open Source from its source code on a system running Ubuntu 24.04 (Noble). +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: @@ -46,60 +46,66 @@ sudo apt-get install -y --no-install-recommends \ libtool ``` -## 2. Download the Redis source code +## 2. Download and extract the Redis source -The Redis source code is available from the [Download](https://redis.io/downloads) page. You can verify the integrity of these downloads by checking them against the digests in the [redis-hashes git repository](https://github.com/redis/redis-hashes). +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. +Copy the tar(1) file to `/usr/src`. -## 3. Extract the source archive +Alternatively, you can download the file directly using the `wget` command, as shown below. -Create a directory for the source code and extract the contents into it: +``` +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 +tar xvf redis-.tar.gz +rm redis-.tar.gz ``` -## 4. Build Redis +## 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 +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 -sudo make install ``` This builds the Redis server, CLI, and any included modules. -## 5. (Optional) Verify the installation +## 4. (Optional) Verify the installation You can confirm that Redis has been built and installed successfully by checking the version: ```bash -redis-server --version -redis-cli --version +./src/redis-server --version +./src/redis-cli --version ``` -## 6. Start Redis +## 5. Start Redis To start Redis, use the following command: ```bash -redis-server /path/to/redis.conf +./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: ``` -redis-cli INFO +./src/redis-cli INFO ... # Modules module:name=ReJSON,ver=20803,api=1,filters=0,usedby=[search],using=[],options=[handle-io-errors] @@ -110,3 +116,10 @@ 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 From 22beaaa6f7a3d284a6c26a858b46d30d7a76ac82 Mon Sep 17 00:00:00 2001 From: David Dougherty Date: Thu, 3 Apr 2025 09:14:14 -0700 Subject: [PATCH 26/32] DEV: add new vector set data type and command pages (#1334) * Initial commit of vector set docs * Add'l commit of vector set docs * Add'l commit of vector set docs * Adding data type and command pages * Added RESP2 and RESP3 return information * Fix some atrocious grammar on the vs index page. * A few more quick fixes * Apply suggestions from code review Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> * Apply review comments Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> * Apply preview banner + misc. fixes --------- Co-authored-by: mich-elle-luna <153109578+mich-elle-luna@users.noreply.github.com> --- content/commands/vadd/index.md | 119 +++++++++++++++++ content/commands/vcard/index.md | 41 ++++++ content/commands/vdim/index.md | 43 ++++++ content/commands/vemb/index.md | 72 +++++++++++ content/commands/vgetattr/index.md | 46 +++++++ content/commands/vinfo/index.md | 52 ++++++++ content/commands/vlinks/index.md | 60 +++++++++ content/commands/vrandmember/index.md | 113 ++++++++++++++++ content/commands/vrem/index.md | 59 +++++++++ content/commands/vsetattr/index.md | 60 +++++++++ content/commands/vsim/index.md | 122 ++++++++++++++++++ .../develop/data-types/vector-sets/_index.md | 40 ++++++ .../data-types/vector-sets/filtered-search.md | 119 +++++++++++++++++ .../develop/data-types/vector-sets/memory.md | 88 +++++++++++++ .../data-types/vector-sets/performance.md | 73 +++++++++++ .../data-types/vector-sets/scalability.md | 83 ++++++++++++ .../data-types/vector-sets/troubleshooting.md | 102 +++++++++++++++ data/resp2_replies.json | 60 +++++++++ data/resp3_replies.json | 62 +++++++++ layouts/commands/list.html | 1 + 20 files changed, 1415 insertions(+) create mode 100644 content/commands/vadd/index.md create mode 100644 content/commands/vcard/index.md create mode 100644 content/commands/vdim/index.md create mode 100644 content/commands/vemb/index.md create mode 100644 content/commands/vgetattr/index.md create mode 100644 content/commands/vinfo/index.md create mode 100644 content/commands/vlinks/index.md create mode 100644 content/commands/vrandmember/index.md create mode 100644 content/commands/vrem/index.md create mode 100644 content/commands/vsetattr/index.md create mode 100644 content/commands/vsim/index.md create mode 100644 content/develop/data-types/vector-sets/_index.md create mode 100644 content/develop/data-types/vector-sets/filtered-search.md create mode 100644 content/develop/data-types/vector-sets/memory.md create mode 100644 content/develop/data-types/vector-sets/performance.md create mode 100644 content/develop/data-types/vector-sets/scalability.md create mode 100644 content/develop/data-types/vector-sets/troubleshooting.md 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/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/data/resp2_replies.json b/data/resp2_replies.json index a2c3bafb37..ac37ede34e 100644 --- a/data/resp2_replies.json +++ b/data/resp2_replies.json @@ -1204,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 3f9321866d..650108d53d 100644 --- a/data/resp3_replies.json +++ b/data/resp3_replies.json @@ -1269,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 2f93f0d386..e19ce379e1 100644 --- a/layouts/commands/list.html +++ b/layouts/commands/list.html @@ -54,6 +54,7 @@

    Commands

    +
    From 1db0babba27cfee018c167dfda08efe87f07cd6a Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Thu, 3 Apr 2025 10:24:34 -0700 Subject: [PATCH 27/32] Typo fix --- content/operate/oss_and_stack/install/build-stack/_index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/operate/oss_and_stack/install/build-stack/_index.md b/content/operate/oss_and_stack/install/build-stack/_index.md index f8f717a817..a902acdfa5 100644 --- a/content/operate/oss_and_stack/install/build-stack/_index.md +++ b/content/operate/oss_and_stack/install/build-stack/_index.md @@ -4,10 +4,10 @@ categories: - operate - stack - oss -description: Build and run Redis Open Source on Linux and macOS -linkTitle: Build and run Redis Open Source +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 Open Source +title: Build and run Redis Community Edition 8 weight: 20 --- From 8527dee4e2c8a4995441ba0e40d27e7a07751225 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Fri, 4 Apr 2025 06:34:13 -0700 Subject: [PATCH 28/32] Update modules-api-ref.md from script --- content/develop/reference/modules/modules-api-ref.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/develop/reference/modules/modules-api-ref.md b/content/develop/reference/modules/modules-api-ref.md index d5184e2564..0bd64c3083 100644 --- a/content/develop/reference/modules/modules-api-ref.md +++ b/content/develop/reference/modules/modules-api-ref.md @@ -7843,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` @@ -7976,8 +7973,9 @@ on the Redis side is dropped as soon as the command callback returns). 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 return non-NULL with a new pointer, +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). From ad0f3f2a03510c1d11f10b348310bdbce3c78d8c Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 7 Apr 2025 08:30:55 -0700 Subject: [PATCH 29/32] Update docker installation instructions --- .../install/install-stack/docker.md | 82 ++++--------------- 1 file changed, 17 insertions(+), 65 deletions(-) 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 1c11703b4f..cc1998f47a 100644 --- a/content/operate/oss_and_stack/install/install-stack/docker.md +++ b/content/operate/oss_and_stack/install/install-stack/docker.md @@ -12,32 +12,12 @@ weight: 1 ## Run Redis Community Edition (CE) on Docker -To get started with Redis CE 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: +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. @@ -45,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 -{{< / 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 +$ docker exec -it redis redis-cli {{< / 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: +If you do have `redis-cli` installed locally, you can run it from your terminal: {{< highlight bash >}} -$ docker run -v `pwd`/local-redis-stack.conf:/redis-stack.conf -p 6379:6379 -p 8001:8001 redis/redis-stack:latest +$ redis-cli -h 127.0.0.1 -p 6379 {{< / highlight >}} -### Environment variables - -To pass in arbitrary configuration changes, you can set any of these environment variables: - -* `REDIS_ARGS`: extra arguments for Redis +## Use a local configuration file -* `REDISEARCH_ARGS`: arguments for the search and query features (RediSearch) +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: -* `REDISJSON_ARGS`: arguments for JSON (RedisJSON) +You can create your own Dockerfile that adds a `redis.conf` from the context into `/data/`, like so. -* `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: +``` +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 -e REDIS_ARGS="--requirepass redis-stack" 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 >}} -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 >}} +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. -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. From 8ca16b96449414f13e6ad480f9e99b36bf7d05ae Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 7 Apr 2025 08:58:16 -0700 Subject: [PATCH 30/32] Update brew installation instructions --- .../install/install-stack/homebrew.md | 76 ++++++------------- 1 file changed, 25 insertions(+), 51 deletions(-) diff --git a/content/operate/oss_and_stack/install/install-stack/homebrew.md b/content/operate/oss_and_stack/install/install-stack/homebrew.md index f23e90c26e..e772cb29c6 100644 --- a/content/operate/oss_and_stack/install/install-stack/homebrew.md +++ b/content/operate/oss_and_stack/install/install-stack/homebrew.md @@ -17,31 +17,29 @@ weight: 6 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 three brew casks available. +There are two brew casks available. -* `redis-stack` contains both `redis-stack-server` and `redis-stack-redisinsight` casks. -* `redis-stack-server` provides Redis Stack server only. -* `redis-stack-redisinsight` contains Redis Insight. +* `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 tap: +First, tap the Redis CE Homebrew cask: {{< highlight bash >}} -brew tap redis-stack/redis-stack +brew tap redis/redis {{< / highlight >}} Next, run `brew install`: {{< highlight bash >}} -brew install redis-stack +brew install --cask redis {{< / highlight >}} -The `redis-stack-server` cask will install all Redis and Redis Stack binaries. How you run these binaries depends on whether you already have Redis installed on your system. -### First-time Redis installation +## 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 Stack installation location. This location is either `/opt/homebrew/bin` for Apple silicon Macs or `/usr/local/bin` for Intel-based Macs. +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: @@ -49,52 +47,23 @@ To check this, run: echo $PATH {{< / highlight >}} -Then, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If these directories are not in the output, see the "Existing Redis installation" instructions below. +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. -{{< note >}} -Because Redis Stack is installed using a brew cask with the `brew tap` command, it will not be integrated with the `brew services` command. -{{< /note >}} - -### Existing Redis installation - -If you have an existing Redis installation on your system, then might want to modify your `$PATH` to ensure that you're using the latest Redis Stack binaries. - -Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following lines. - -For Intel-based Macs: +Open the file `~/.bashrc` or `~/zshrc` (depending on your shell), and add the following line. {{< highlight bash >}} -export PATH=/usr/local/Caskroom/redis-stack-server//bin:$PATH +export PATH=$(brew --prefix)/bin:$PATH {{< / highlight >}} -For Apple silicon Macs: - -{{< highlight bash >}} -export PATH=/opt/homebrew/Caskroom/redis-stack-server//bin:$PATH -{{< / highlight >}} - -In both cases, replace `` with your version of Redis Stack. For example, with version 6.2.0, path is as follows: - -{{< highlight bash >}} -export PATH=/opt/homebrew/Caskroom/redis-stack-server/6.2.0/bin:$PATH -{{< / highlight >}} - -### Start Redis server - You can now start Redis server as follows: {{< highlight bash >}} -redis-stack-server +redis-server {{< / highlight >}} -## Uninstall Redis CE - -To uninstall Redis CE, run: - -{{< highlight bash >}} -brew uninstall redis-stack-redisinsight redis-stack-server redis-stack -brew untap redis-stack/redis-stack -{{< / 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 @@ -107,12 +76,18 @@ redis-cli Test the connection with the `ping` command: {{< highlight bash >}} -127.0.0.1:6379> ping +127.0.0.1:6379> PING PONG {{< / highlight >}} -You can also test that your Redis server is running using -[Redis Insight]({{< relref "/develop/tools/insight" >}}). +## Uninstall Redis CE + +To uninstall Redis CE, run: + +{{< highlight bash >}} +brew uninstall redis +brew untap redis/redis +{{< / highlight >}} ## Next steps @@ -120,5 +95,4 @@ 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/archive/install-redis#install-redis-properly" >}}) - for production use. +* Connect using [Redis Insight]({{< relref "/develop/tools/insight" >}}) From 2c026777b731449a2db2b765a5e5818215c9d895 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 7 Apr 2025 10:05:42 -0700 Subject: [PATCH 31/32] Add what's new info --- content/develop/whats-new/8-0-rc-1.md | 79 +++++++++++++++++++ .../develop/whats-new/redis-feature-sets.md | 1 + 2 files changed, 80 insertions(+) create mode 100644 content/develop/whats-new/8-0-rc-1.md 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. | From 970bbb1a05d0866ea08b5a3376e0e77010f32604 Mon Sep 17 00:00:00 2001 From: "David W. Dougherty" Date: Mon, 7 Apr 2025 10:29:17 -0700 Subject: [PATCH 32/32] Update snap installation instructions --- .../install/install-stack/snap.md | 50 ++++++------------- 1 file changed, 14 insertions(+), 36 deletions(-) diff --git a/content/operate/oss_and_stack/install/install-stack/snap.md b/content/operate/oss_and_stack/install/install-stack/snap.md index 307086a8e2..395982f700 100644 --- a/content/operate/oss_and_stack/install/install-stack/snap.md +++ b/content/operate/oss_and_stack/install/install-stack/snap.md @@ -12,49 +12,27 @@ weight: 4 ## Install Redis Community Edition (CE) on Ubuntu Linux using Snap -First, download the latest Redis CE Snap package from [this page](https://redis.io/downloads/). - -To install, run: +To install Redis via snap, run the following commands: {{< highlight bash >}} sudo apt update -sudo apt install redis-tools -sudo snap install --dangerous --classic +sudo apt install redis-tools # this will install `redis-cli` +sudo snap install redis {{< / highlight >}} -Redis will not start automatically, nor will it start at boot time. To start `redis-server` in the foreground, run the command: - -{{< highlight bash >}} -sudo snap run redis-server -{{< /highlight >}} - -To stop Redis, enter `Ctrl-C`. +Redis will start automatically after installation and also at boot time. -Follow these steps to integrate Redis CE with `systemd` so you can start/stop in/from the background: +## Connect to Redis CE -1. Edit the `/etc/systemd/system/redis-server.service` file and enter the following information: +Once Redis is running, you can test it by running `redis-cli`: - {{< highlight text >}} - [Unit] - Description=Redis CE Server - After=network.target - - [Service] - ExecStart=/usr/bin/snap run redis-server - Restart=always - User=root - Group=root - - [Install] - WantedBy=multi-user.target - {{< /highlight >}} - -1. Run the following commands. +{{< highlight bash >}} +redis-cli +{{< / highlight >}} - {{< highlight bash >}} - sudo systemctl daemon-reload - sudo systemctl start redis-server - sudo systemctl enable redis-server - {{< /highlight >}} +Test the connection with the `ping` command: -If your Linux distribution does not currently have Snap installed, you can install it using the instructions described [here](https://snapcraft.io/docs/installing-snapd). Then, download the appropriate from the [downloads page](https://redis.io/downloads/). +{{< highlight bash >}} +127.0.0.1:6379> PING +PONG +{{< / highlight >}} \ No newline at end of file