Skip to content
Open
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
10 changes: 4 additions & 6 deletions content/commands/bf.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,10 @@ is an item to add.

## Examples

{{< highlight bash >}}
redis> BF.ADD bf item1
(integer) 1
redis> BF.ADD bf item1
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
BF.ADD bf item1
BF.ADD bf item1
{{% /redis-cli %}}
Comment thread
cursor[bot] marked this conversation as resolved.

## Redis Software and Redis Cloud compatibility

Expand Down
13 changes: 5 additions & 8 deletions content/commands/bf.card.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@ is key name for a Bloom filter.

## Examples

{{< highlight bash >}}
redis> BF.ADD bf1 item_foo
(integer) 1
redis> BF.CARD bf1
(integer) 1
redis> BF.CARD bf_new
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
BF.ADD bf1 item_foo
BF.CARD bf1
BF.CARD bf_new
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
13 changes: 5 additions & 8 deletions content/commands/bf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ is an item to check.

## Examples

{{< highlight bash >}}
redis> BF.ADD bf item1
(integer) 1
redis> BF.EXISTS bf item1
(integer) 1
redis> BF.EXISTS bf item2
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
BF.ADD bf item1
BF.EXISTS bf item1
BF.EXISTS bf item2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
22 changes: 5 additions & 17 deletions content/commands/bf.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,23 +86,11 @@ Return the expansion rate.

## Examples

{{< highlight bash >}}
redis> BF.ADD bf1 observation1
(integer) 1
redis> BF.INFO bf1
1) Capacity
2) (integer) 100
3) Size
4) (integer) 240
5) Number of filters
6) (integer) 1
7) Number of items inserted
8) (integer) 1
9) Expansion rate
10) (integer) 2
redis> BF.INFO bf1 CAPACITY
1) (integer) 100
{{< / highlight >}}
{{% redis-cli %}}
BF.ADD bf1 observation1
BF.INFO bf1
BF.INFO bf1 CAPACITY
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
12 changes: 6 additions & 6 deletions content/commands/bf.insert.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,21 @@ Otherwise, use an `expansion` of `1` to reduce memory consumption. The default v

Add three items to a filter, then create the filter with default parameters if it does not already exist.

{{< highlight bash >}}
{{% redis-cli %}}
BF.INSERT filter ITEMS foo bar baz
{{< / highlight >}}
{{% /redis-cli %}}

Add one item to a filter, then create the filter with a capacity of 10000 if it does not already exist.

{{< highlight bash >}}
{{% redis-cli %}}
BF.INSERT filter CAPACITY 10000 ITEMS hello
{{< / highlight >}}
{{% /redis-cli %}}

Add two items to a filter, then return error if the filter does not already exist.

{{< highlight bash >}}
{{% redis-cli %}}
BF.INSERT filter NOCREATE ITEMS foo bar
{{< / highlight >}}
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
9 changes: 3 additions & 6 deletions content/commands/bf.madd.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,9 @@ One or more items to add.

## Examples

{{< highlight bash >}}
redis> BF.MADD bf item1 item2 item2
1) (integer) 1
2) (integer) 1
3) (integer) 0
{{< / highlight >}}
{{% redis-cli %}}
BF.MADD bf item1 item2 item2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
13 changes: 4 additions & 9 deletions content/commands/bf.mexists.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ One or more items to check.

## Examples

{{< highlight bash >}}
redis> BF.MADD bf item1 item2
1) (integer) 1
2) (integer) 1
redis> BF.MEXISTS bf item1 item2 item3
1) (integer) 1
2) (integer) 1
3) (integer) 0
{{< / highlight >}}
{{% redis-cli %}}
BF.MADD bf item1 item2
BF.MEXISTS bf item1 item2 item3
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
34 changes: 15 additions & 19 deletions content/commands/bf.reserve.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,21 @@ Otherwise, you use an `expansion` of `1` to reduce memory consumption. The defau

## Examples

{{< highlight bash >}}
redis> BF.RESERVE bf 0.01 1000
OK
{{< / highlight >}}

{{< highlight bash >}}
redis> BF.RESERVE bf 0.01 1000
(error) ERR item exists
{{< / highlight >}}

{{< highlight bash >}}
redis> BF.RESERVE bf_exp 0.01 1000 EXPANSION 2
OK
{{< / highlight >}}

{{< highlight bash >}}
redis> BF.RESERVE bf_non 0.01 1000 NONSCALING
OK
{{< / highlight >}}
{{% redis-cli %}}
BF.RESERVE bf 0.01 1000
{{% /redis-cli %}}

{{% redis-cli %}}
BF.RESERVE bf 0.01 1000
{{% /redis-cli %}}

{{% redis-cli %}}
BF.RESERVE bf_exp 0.01 1000 EXPANSION 2
{{% /redis-cli %}}

{{% redis-cli %}}
BF.RESERVE bf_non 0.01 1000 NONSCALING
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
34 changes: 11 additions & 23 deletions content/commands/bf.scandump.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,17 @@ Iterator value; either 0 or the iterator from a previous invocation of this comm

## Examples

{{< highlight bash >}}
redis> BF.RESERVE bf 0.1 10
OK
redis> BF.ADD bf item1
1) (integer) 1
redis> BF.SCANDUMP bf 0
1) (integer) 1
2) "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x02\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x9a\x99\x99\x99\x99\x99\xa9?J\xf7\xd4\x9e\xde\xf0\x18@\x05\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00"
redis> BF.SCANDUMP bf 1
1) (integer) 9
2) "\x01\b\x00\x80\x00\x04 \x00"
redis> BF.SCANDUMP bf 9
1) (integer) 0
2) ""
redis> DEL bf
(integer) 1
redis> BF.LOADCHUNK bf 1 "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x02\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x9a\x99\x99\x99\x99\x99\xa9?J\xf7\xd4\x9e\xde\xf0\x18@\x05\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00"
OK
redis> BF.LOADCHUNK bf 9 "\x01\b\x00\x80\x00\x04 \x00"
OK
redis> BF.EXISTS bf item1
(integer) 1
{{< / highlight >}}
{{% redis-cli %}}
BF.RESERVE bf 0.1 10
BF.ADD bf item1
BF.SCANDUMP bf 0
BF.SCANDUMP bf 1
BF.SCANDUMP bf 9
DEL bf
BF.LOADCHUNK bf 1 "\x01\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x05\x00\x00\x00\x02\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x9a\x99\x99\x99\x99\x99\xa9?J\xf7\xd4\x9e\xde\xf0\x18@\x05\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00"
BF.LOADCHUNK bf 9 "\x01\b\x00\x80\x00\x04 \x00"
BF.EXISTS bf item1
{{% /redis-cli %}}

Python code:
{{< highlight bash >}}
Expand Down
10 changes: 4 additions & 6 deletions content/commands/cf.add.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ The filter attempts to `Cuckoo` swap items up to `maxIterations` times.

## Examples

{{< highlight bash >}}
redis> CF.ADD cf item1
(integer) 1
redis> CF.ADD cf item1
(integer) 1
{{< / highlight >}}
{{% redis-cli %}}
CF.ADD cf item1
CF.ADD cf item1
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
10 changes: 4 additions & 6 deletions content/commands/cf.addnx.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ is an item to add.

## Examples

{{< highlight bash >}}
redis> CF.ADDNX cf item
(integer) 1
redis> CF.ADDNX cf item
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
CF.ADDNX cf item
CF.ADDNX cf item
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
15 changes: 5 additions & 10 deletions content/commands/cf.count.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,11 @@ is an item to check.

## Examples

{{< highlight bash >}}
redis> CF.INSERT cf ITEMS item1 item2 item2
1) (integer) 1
2) (integer) 1
3) (integer) 1
redis> CF.COUNT cf item1
(integer) 1
redis> CF.COUNT cf item2
(integer) 2
{{< / highlight >}}
{{% redis-cli %}}
CF.INSERT cf ITEMS item1 item2 item2
CF.COUNT cf item1
CF.COUNT cf item2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
24 changes: 8 additions & 16 deletions content/commands/cf.del.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,14 @@ checked on all `sub-filters`.

## Examples

{{< highlight bash >}}
redis> CF.INSERT cf ITEMS item1 item2 item2
1) (integer) 1
2) (integer) 1
3) (integer) 1
redis> CF.DEL cf item1
(integer) 1
redis> CF.DEL cf item1
(integer) 0
redis> CF.DEL cf item2
(integer) 1
redis> CF.DEL cf item2
(integer) 1
redis> CF.DEL cf item2
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
CF.INSERT cf ITEMS item1 item2 item2
CF.DEL cf item1
CF.DEL cf item1
CF.DEL cf item2
CF.DEL cf item2
CF.DEL cf item2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
13 changes: 5 additions & 8 deletions content/commands/cf.exists.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,11 @@ is an item to check.

## Examples

{{< highlight bash >}}
redis> CF.ADD cf item1
(integer) 1
redis> CF.EXISTS cf item1
(integer) 1
redis> CF.EXISTS cf item2
(integer) 0
{{< / highlight >}}
{{% redis-cli %}}
CF.ADD cf item1
CF.EXISTS cf item1
CF.EXISTS cf item2
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
22 changes: 3 additions & 19 deletions content/commands/cf.info.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,9 @@ is key name for a cuckoo filter.

## Examples

{{< highlight bash >}}
redis> CF.INFO cf
1) Size
2) (integer) 1080
3) Number of buckets
4) (integer) 512
5) Number of filter
6) (integer) 1
7) Number of items inserted
8) (integer) 0
9) Number of items deleted
10) (integer) 0
11) Bucket size
12) (integer) 2
13) Expansion rate
14) (integer) 1
15) Max iteration
16) (integer) 20
{{< / highlight >}}
{{% redis-cli %}}
CF.INFO cf
{{% /redis-cli %}}

## Redis Software and Redis Cloud compatibility

Expand Down
Loading
Loading