Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LRC-299: link fixes throughout RO&S > RE&RS pages #80

Merged
merged 2 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can only use the [legacy path syntax](#legacy-path-syntax) to access JSON ke

You can index, search, and query stored JSON documents.

For more information about how to search and query JSON documents, see the [quick start]({{< relref "/develop/interact/search-and-query/indexing/" >}}).
For more information about how to search and query JSON documents, see the [quick start]({{< relref "/develop/get-started/document-database" >}}).

## JSON in Active-Active databases

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,27 @@ The search and query engine indexes documents, which are objects that represent
As the documents in your database change, the index automatically processes these changes to keep the search results up to date.

With indexes, you can do:
- Language-aware [fuzzy matching]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}})
- Fast [auto-complete]({{< relref "/develop/interact/search-and-query/administration/overview" >}})
- [Exact phrase matching]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}})
- [Numeric filtering]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}}#numeric-filters-in-query)
- [Geo-radius queries]({{< relref "/develop/interact/search-and-query/advanced-concepts/query_syntax" >}}#geo-filters-in-query)
- Language-aware [fuzzy matching]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/query_syntax#fuzzy-matching)
- Fast [auto-complete]({{< baseurl >}}/develop/interact/search-and-query/administration/overview#auto-complete)
- [Exact phrase matching]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/query_syntax)
- [Numeric filtering]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/query_syntax#numeric-filters-in-query)
- [Geo-radius queries]({{< baseurl >}}/develop/interact/search-and-query/advanced-concepts/query_syntax#geo-filters)

## Supported document types

You can store documents as Redis [hashes]({{< relref "/develop/data-types/" >}}) or [JSON](http://www.json.org/). To search and query JSON documents, you also need to enable [JSON]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json" >}}) in your database.
You can store documents as Redis [hashes]({{< relref "/develop/data-types/hashes" >}}) or [JSON]({{< relref "/develop/data-types/json" >}}). To search and query JSON documents, you also need to enable [JSON]({{< relref "/operate/oss_and_stack/stack-with-enterprise/json" >}}) in your database.

### Hash documents

With Redis [hashes]({{< relref "/develop/data-types/" >}}), each document is assigned to a single key and uses field-value pairs to represent the document's contents.
With Redis [hashes]({{< relref "/develop/data-types/hashes" >}}), each document is assigned to a single key and uses field-value pairs to represent the document's contents.

You can run [`HGETALL`]({{< relref "/commands" >}}/hgetall/) to retrieve the entire hash document.

### JSON documents

You can index, search, and query JSON documents stored in your database.

For more information about how to search and query JSON documents, see the [quick start]({{< relref "/develop/interact/search-and-query/indexing/" >}}).
For more information about how to search and query JSON documents, see the [quick start]({{< relref "/develop/get-started/document-database" >}}).

## Search features

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To replicate a RediSearch 1.x database to a RediSearch 2.x database:

### Add RediSearch 2.x to the cluster {#add-new-module}

1. Download the RediSearch 2.x module package from the [Redis Download Center](https://redis.com/redis-enterprise-software/download-center/modules/).
1. Download the RediSearch 2.x module package from the [Redis Download Center](https://redis.io/downloads).

1. In the Redis Enterprise admin console, select **settings**.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ Each sample is a tuple of the time and the value of 128 bits,

## Time series capabilities

Redis Stack provides a new data type that uses chunks of memory of fixed size for time series samples, indexed by the same Radix Tree implementation as Redis streams. With streams, you can create [a capped stream]({{< relref "/commands" >}}/xadd), 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 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.

### Downsampling/compaction

| Before Downsampling | After Downsampling |
| --- | --- |
| {{< image filename="/images/rs/TimeSeries-downsampling1.png" >}} | {{< image filename="/images/rs/TimeSeries-downsampling2.png" >}} |

If you want to keep all of your raw data points indefinitely, your data set grows linearly over time. However, if your use case allows you to have less fine-grained data further back in time, downsampling can be applied. This allows you to keep fewer historical data points by aggregating raw data for a given time window using a given aggregation function. Time series support [downsampling]({{< relref "/develop/data-types/timeseries/quickstart" >}}) with the following aggregations: avg, sum, min, max, range, count, first, and last.
If you want to keep all of your raw data points indefinitely, your data set grows linearly over time. However, if your use case allows you to have less fine-grained data further back in time, downsampling can be applied. This allows you to keep fewer historical data points by aggregating raw data for a given time window using a given aggregation function. Time series support [downsampling]({{< baseurl >}}/develop/data-types/timeseries/quickstart#aggregation) with the following aggregations: avg, sum, min, max, range, count, first, and last.

### Secondary indexing

When using Redis’ core data structures, you can only retrieve a time series by knowing the exact key holding the time series. Unfortunately, for many time series use cases (such as root cause analysis or monitoring), your application won’t know the exact key it’s looking for. These use cases typically want to query a set of time series that relate to each other in a couple of dimensions to extract the insight you need. You could create your own secondary index with core Redis data structures to help with this, but it would come with a high development cost and require you to manage edge cases to make sure the index is correct.

Redis does this indexing for you based on `field value` pairs called [labels]({{< relref "/develop/data-types/timeseries/quickstart" >}}). You can add labels to each time series and use them to [filter]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) at query time.
Redis does this indexing for you based on `field value` pairs called [labels]({{< baseurl >}}/develop/data-types/timeseries/quickstart#labels). You can add labels to each time series and use them to [filter]({{< baseurl >}}/develop/data-types/timeseries/quickstart#filtering) at query time.

Here’s an example of creating a time series with two labels (sensor_id and area_id are the fields with values 2 and 32 respectively) and a retention window of 60,000 milliseconds:

Expand All @@ -56,7 +56,7 @@ Here’s an example of creating a time series with two labels (sensor_id and are

When you need to query a time series, it’s cumbersome to stream all raw data points if you’re only interested in, say, an average over a given time interval. Time series only transfer the minimum required data to ensure lowest latency.

Here's an example of [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}) over time buckets of 5,000 milliseconds:
Here's an example of [aggregation]({{< baseurl >}}/develop/data-types/timeseries/quickstart#aggregation) over time buckets of 5,000 milliseconds:

```sh
127.0.0.1:12543> TS.RANGE temperature:3:32 1548149180000 1548149210000 AGGREGATION avg 5000
Expand All @@ -82,7 +82,7 @@ Redis Stack comes with several integrations into existing time series tools. One

{{< image filename="/images/rs/TimeSeries-integrations.png" >}}

Furthermore, we also created direct integrations for [Grafana](https://github.com/RedisTimeSeries/grafana-redistimeseries) and [Telegraf](https://github.com/RedisTimeSeries/telegraf). [This repository](https://github.com/RedisTimeSeries/prometheus-demos) contains a docker-compose setup of RedisTimeSeries, its remote write adaptor, Prometheus and [Grafana](https://grafana.com/). It also comes with a set of data generators and pre-built Grafana dashboards.
Furthermore, we also created direct integrations for [Grafana](https://github.com/RedisTimeSeries/grafana-redistimeseries). [This repository](https://github.com/RedisTimeSeries/prometheus-demos) contains a docker-compose setup of RedisTimeSeries, its remote write adaptor, Prometheus and [Grafana](https://grafana.com/). It also comes with a set of data generators and pre-built Grafana dashboards.

## Time series modeling approaches with Redis

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ The following table lists time series commands. See the command links for more i
| [TS.ADD]({{< relref "/commands" >}}/ts.add) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported"><nobr>&#x2705; Flexible & Annual</nobr></span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Appends a sample to a time series. |
| [TS.ALTER]({{< relref "/commands" >}}/ts.alter) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Updates the retention, chunk size, duplicate policy, or labels for an existing time series. |
| [TS.CREATE]({{< relref "/commands" >}}/ts.create) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Creates a new time series. |
| [TS.CREATERULE]({{< relref "/commands" >}}/ts.createrule) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Creates a compaction rule for [downsampling]({{< relref "/develop/data-types/timeseries/quickstart" >}}). |
| [TS.CREATERULE]({{< relref "/commands" >}}/ts.createrule) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Creates a compaction rule for [downsampling]({{< baseurl >}}/develop/data-types/timeseries/quickstart#aggregation). |
| [TS.DECRBY]({{< relref "/commands" >}}/ts.decrby) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Decreases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the decreased value as a new sample, depending on the timestamp option. |
| [TS.DEL]({{< relref "/commands" >}}/ts.del) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Removes all samples between two timestamps for a given time series. |
| [TS.DELETERULE]({{< relref "/commands" >}}/ts.deleterule) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Removes a compaction rule. |
| [TS.GET]({{< relref "/commands" >}}/ts.get) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns the last sample in a time series. |
| [TS.INCRBY]({{< relref "/commands" >}}/ts.incrby) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Increases the value of the latest sample in a time series by the specified number. Either modifies the existing sample or adds the increased value as a new sample, depending on the timestamp option. |
| [TS.INFO]({{< relref "/commands" >}}/ts.info) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns time series information and statistics. |
| [TS.MADD]({{< relref "/commands" >}}/ts.madd) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Appends multiple samples to one or more time series. |
| [TS.MGET]({{< relref "/commands" >}}/ts.mget) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns multiple samples with [labels]({{< relref "/develop/data-types/timeseries/quickstart" >}}) that match the filter. |
| [TS.MRANGE]({{< relref "/commands" >}}/ts.mrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps, from earliest to latest. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}). |
| [TS.MREVRANGE]({{< relref "/commands" >}}/ts.mrevrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps in reverse order, from latest to earliest. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}). |
| [TS.QUERYINDEX]({{< relref "/commands" >}}/ts.queryindex) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns the keys of all time series with [labels]({{< relref "/develop/data-types/timeseries/quickstart" >}}) that match the given filters. |
| [TS.RANGE]({{< relref "/commands" >}}/ts.range) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the start of a single time series, runs a query against samples within a range of timestamps. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}). |
| [TS.REVRANGE]({{< relref "/commands" >}}/ts.revrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the end of a single time series, runs a query against samples within a range of timestamps in reverse order. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}). |
| [TS.MGET]({{< relref "/commands" >}}/ts.mget) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns multiple samples with [labels]({{< baseurl >}}/develop/data-types/timeseries/quickstart#labels) that match the filter. |
| [TS.MRANGE]({{< relref "/commands" >}}/ts.mrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps, from earliest to latest. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}#aggregation). |
| [TS.MREVRANGE]({{< relref "/commands" >}}/ts.mrevrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | For multiple time series, runs a query against samples within a range of timestamps in reverse order, from latest to earliest. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}#aggregation). |
| [TS.QUERYINDEX]({{< relref "/commands" >}}/ts.queryindex) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | Returns the keys of all time series with [labels]({{< relref "/develop/data-types/timeseries/quickstart" >}}#labels) that match the given filters. |
| [TS.RANGE]({{< relref "/commands" >}}/ts.range) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the start of a single time series, runs a query against samples within a range of timestamps. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}#aggregation). |
| [TS.REVRANGE]({{< relref "/commands" >}}/ts.revrange) | <span title="Supported">&#x2705; Supported</span><br /><span><br /></span> | <span title="Supported">&#x2705; Flexible & Annual</span><br /><span title="Supported">&#x2705; Free & Fixed</nobr></span> | From the end of a single time series, runs a query against samples within a range of timestamps in reverse order. Supports [filtering]({{< relref "/develop/data-types/timeseries/quickstart" >}}#filtering) and [aggregation]({{< relref "/develop/data-types/timeseries/quickstart" >}}#aggregation). |
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ After you load a function into your database, you can run them manually or use t

## More info

- [Triggers and functions quick start]({{< relref "/develop/interact/programmability/triggers-and-functions/" >}}quick_start/)
- [Triggers and functions quick start]({{< relref "/develop/interact/programmability/triggers-and-functions/quick_start_cli" >}})

- [Triggers and functions documentation]({{< relref "/develop/interact/programmability/triggers-and-functions/" >}})
Loading