You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ds/hashes.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,4 +44,4 @@ HINCRBY bike:1 price 100
44
44
HINCRBY bike:1 price -100
45
45
```
46
46
47
-
See [here](https://redis.io/docs/data-types/hashes) for the hash type reference page, and [here](https://redis.io/commands/?group=hash) for the entire set of Redis hash commands.
47
+
See [here](https://redis.io/docs/data-types/hashes?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the hash type reference page, and [here](https://redis.io/commands/?group=hash?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the entire set of Redis hash commands.
Copy file name to clipboardExpand all lines: src/ds/lists.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -78,4 +78,4 @@ KEYS bike:colors
78
78
**Note**:
79
79
> `LRANGE` will return an empty (null) list if a key no longer exists.
80
80
81
-
See [here](https://redis.io/docs/data-types/list) for the list type reference page, and [here](https://redis.io/commands/?group=list) for the entire set of Redis list commands.
81
+
See [here](https://redis.io/docs/data-types/list?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the list type reference page, and [here](https://redis.io/commands/?group=list&utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the entire set of Redis list commands.
Copy file name to clipboardExpand all lines: src/ds/prob/bloom-cuckoo.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ How can a Bloom filter be helpful to an online bike shop service? For starters,
16
16
Another use case is targeting ads to users. A per-user Bloom filter can be created and populated with all the products each user has purchased from the shop. When the shop's ad suggestion engine provides a list of possible ads to show a user, it can check each item against the user's Bloom filter. Each item that is not part of the filter are good targets. For each item that might already be part of the filter, a second query can be made to the primary database to confirm. If the second confirmation is negative, then that ad can be added to the target list.
17
17
18
18
First, create a bloom filter and configure an acceptable false positive rate for your use case.
19
-
You can also specify an initial capacity; the size of the dataset that you expect to add to the filter. Bloom filters can be configured to expand when this capacity is reached - [see the `BF.RESERVE` documentation for details](https://redis.io/commands/bf.reserve/).
19
+
You can also specify an initial capacity; the size of the dataset that you expect to add to the filter. Bloom filters can be configured to expand when this capacity is reached - [see the `BF.RESERVE` documentation for details](https://redis.io/commands/bf.reserve/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials).
20
20
21
21
```redis Create a Bloom filter
22
22
BF.RESERVE user:778:bought_products 0.001 50 // create new bloom filter at key "user:778:bought_products" with a desired false positive rate of 0.1% (0.001) and anticipated data set size of 50 entries
BF.INSERT bloomF NOCREATE ITEMS foo bar // tries to add 2 items to a filter with an error if the filter does not already exist
51
51
```
52
52
53
-
You can read more about Bloom filters and their use cases [here](https://redis.io/docs/data-types/probabilistic/bloom-filter/). See [here](https://redis.io/commands/?group=bf) for the complete list of Bloom filter commands.
53
+
You can read more about Bloom filters and their use cases [here](https://redis.io/docs/data-types/probabilistic/bloom-filter/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials). See [here](https://redis.io/commands/?group=bf&utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the complete list of Bloom filter commands.
Copy file name to clipboardExpand all lines: src/ds/sets.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -63,4 +63,4 @@ SPOP bike:1:addons
63
63
SMEMBERS bike:1:addons
64
64
```
65
65
66
-
See [here](https://redis.io/docs/data-types/sets) for the set type reference page, and [here](https://redis.io/commands/?group=set) for the entire list of Redis set commands.
66
+
See [here](https://redis.io/docs/data-types/sets?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the set type reference page, and [here](https://redis.io/commands/?group=set&utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the entire list of Redis set commands.
Copy file name to clipboardExpand all lines: src/ds/sorted_sets.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44,4 +44,4 @@ You can get the rank of any sorted set member using the `ZRANK` command. Note: t
44
44
ZRANK bike:brands "Claude Shannon" WITHSCORE
45
45
```
46
46
47
-
See [here](https://redis.io/docs/data-types/sorted-sets) for the sorted set type reference page, and [here](https://redis.io/commands/?group=sorted-set) for the entire list of Redis sorted set commands.
47
+
See [here](https://redis.io/docs/data-types/sorted-sets?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the sorted set type reference page, and [here](https://redis.io/commands/?group=sorted-set&utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the entire list of Redis sorted set commands.
Copy file name to clipboardExpand all lines: src/ds/strings.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -106,4 +106,4 @@ PERSIST bike:1:lock_status
106
106
TTL bike:1:lock_status
107
107
```
108
108
109
-
See [here](https://redis.io/docs/data-types/strings) for the string type reference page, and [here](https://redis.io/commands/?group=string) for the entire set of Redis string commands.
109
+
See [here](https://redis.io/docs/data-types/strings?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the string type reference page, and [here](https://redis.io/commands/?group=string&utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) for the entire set of Redis string commands.
Copy file name to clipboardExpand all lines: src/sq/aggregations.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ An aggregation query allows you to perform the following actions:
4
4
- Group data based on field values.
5
5
- Apply aggregation functions on the grouped data.
6
6
7
-
This article explains the basic usage of the [FT.AGGREGATE](https://redis.io/commands/ft.aggregate/) command. For further details, see the [command specification](https://redis.io/commands/ft.aggregate/) and the [aggregations reference documentation](https://redis.io/docs/interact/search-and-query/advanced-concepts/aggregations).
7
+
This article explains the basic usage of the `FT.AGGREGATE` command. For further details, see the [command specification](https://redis.io/commands/ft.aggregate/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials) and the [aggregations reference documentation](https://redis.io/docs/interact/search-and-query/advanced-concepts/aggregations?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials).
8
8
9
9
The examples in this article use a schema with the following fields:
10
10
@@ -49,7 +49,7 @@ FT.AGGREGATE index "query_expr" LOAD n "field_1" .. "field_n" APPLY "function_ex
49
49
50
50
Here is a more detailed explanation of the query syntax:
51
51
52
-
1.**Query expression**: you can use the same query expressions as you would use with the `FT.SEARCH` command. You can substitute `query_expr` with any of the expressions explained in the articles of this [query topic](https://redis.io/docs/interact/search-and-query/query/). Vector search queries are an exception. You can't combine a vector search with an aggregation query.
52
+
1.**Query expression**: you can use the same query expressions as you would use with the `FT.SEARCH` command. You can substitute `query_expr` with any of the expressions explained in the articles of this [query topic](https://redis.io/docs/interact/search-and-query/query/?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials). Vector search queries are an exception. You can't combine a vector search with an aggregation query.
53
53
2.**Loaded fields**: if field values weren't already loaded into the aggregation pipeline, you can force their presence via the `LOAD` clause. This clause takes the number of fields (`n`), followed by the field names (`"field_1" .. "field_n"`).
54
54
3.**Mapping function**: this mapping function operates on the field values. A specific field is referenced as `@field_name` within the function expression. The result is returned as `result_field`.
55
55
@@ -73,7 +73,7 @@ FT.AGGREGATE index "query_expr" ... GROUPBY n "field_1" .. "field_n" REDUCE AGG
73
73
Here is an explanation of the additional constructs:
74
74
75
75
1.**Grouping**: you can group by one or many fields. Each ordered sequence of field values then defines one group. It's also possible to group by values that resulted from a previous `APPLY ... AS`.
76
-
2.**Aggregation**: you must replace `AGG_FUNC` with one of the supported aggregation functions (e.g., `SUM` or `COUNT`). A complete list of functions is available in the [aggregations reference documentation](https://redis.io/docs/interact/search-and-query/advanced-concepts/aggregations). Replace `aggregated_result_field` with a value of your choice.
76
+
2.**Aggregation**: you must replace `AGG_FUNC` with one of the supported aggregation functions (e.g., `SUM` or `COUNT`). A complete list of functions is available in the [aggregations reference documentation](https://redis.io/docs/interact/search-and-query/advanced-concepts/aggregations?utm_source=redisinsight&utm_medium=main&utm_campaign=tutorials). Replace `aggregated_result_field` with a value of your choice.
77
77
78
78
The following query shows you how to group by the field `condition` and apply a reduction based on the previously derived `price_category`. The expression `@price<1000` causes a bicycle to have the price category `1` if its price is lower than 1000 USD. Otherwise, it has the price category `0`. The output is the number of affordable bicycles grouped by price category.
> You can also create more complex aggregation pipelines with [FT.AGGREGATE](https://redis.io/commands/ft.aggregate/). Applying multiple reduction functions under one `GROUPBY` clause is possible. In addition, you can also chain groupings and mix in additional mapping steps (e.g., `GROUPBY ... REDUCE ... APPLY ... GROUPBY ... REDUCE`)
85
+
> You can also create more complex aggregation pipelines with `FT.AGGREGATE`. Applying multiple reduction functions under one `GROUPBY` clause is possible. In addition, you can also chain groupings and mix in additional mapping steps (e.g., `GROUPBY ... REDUCE ... APPLY ... GROUPBY ... REDUCE`)
0 commit comments