@@ -97,7 +97,6 @@ This gives a very compact representation of the
97
97
set's membership with a fixed memory size, regardless of how many items you
98
98
add. The following example adds some names to a Bloom filter representing
99
99
a list of users and checks for the presence or absence of users in the list.
100
- Note that you must use the ` bf() ` method to access the Bloom filter commands.
101
100
102
101
``` go
103
102
res1 , err := rdb.BFMAdd (
@@ -134,9 +133,7 @@ fmt.Println(res3) // >>> false
134
133
< /clients-example >}}-->
135
134
136
135
A Cuckoo filter has similar features to a Bloom filter, but also supports
137
- a deletion operation to remove hashes from a set, as shown in the example
138
- below. Note that you must use the ` cf() ` method to access the Cuckoo filter
139
- commands.
136
+ a deletion operation to remove hashes from a set, as shown in the example below.
140
137
141
138
``` go
142
139
res4 , err := rdb.CFAdd (ctx, " other_users" , " paolo" ).Result ()
@@ -310,10 +307,11 @@ desired range. For example, you can request that the count should
310
307
stay within 0.1% of the true value and have a 0.05% probability
311
308
of going outside this limit. The example below shows how to create
312
309
a Count-min sketch object, add data to it, and then query it.
313
- Note that you must use the ` cms() ` method to access the Count-min
314
- sketch commands.
315
310
316
311
``` go
312
+ // Specify that you want to keep the counts within 0.01
313
+ // (1%) of the true value with a 0.005 (0.5%) chance
314
+ // of going outside this limit.
317
315
res16 , err := rdb.CMSInitByProb (ctx, " items_sold" , 0.01 , 0.005 ).Result ()
318
316
319
317
if err != nil {
@@ -391,8 +389,7 @@ maximum values, the quantile of 0.75, and the
391
389
[ cumulative distribution function] ( https://en.wikipedia.org/wiki/Cumulative_distribution_function )
392
390
(CDF), which is effectively the inverse of the quantile function. It also
393
391
shows how to merge two or more t-digest objects to query the combined
394
- data set. Note that you must use the ` tdigest() ` method to access the
395
- t-digest commands.
392
+ data set.
396
393
397
394
``` go
398
395
res20 , err := rdb.TDigestCreate (ctx, " male_heights" ).Result ()
@@ -511,8 +508,7 @@ The example below adds several different items to a Top-K object
511
508
that tracks the top three items (this is the second parameter to
512
509
the ` topk().reserve() ` method). It also shows how to list the
513
510
top * k* items and query whether or not a given item is in the
514
- list. Note that you must use the ` topk() ` method to access the
515
- Top-K commands.
511
+ list.
516
512
517
513
``` go
518
514
// Create a TopK filter that keeps track of the top 3 items
0 commit comments