Skip to content

Error in documentation regarding initialisation of RedisBloom and TopK #2415

Closed
@radioactive11

Description

@radioactive11

Link to documentation

Version: redis-py version: 4.3.4 & redis-stack running on Docker (v6.2.7)

Platform: Python 3.10.6 on macOS
Description: Creating a bloom filter or TopK client according to the documentation throws an AttributeError

Sample:

>>> import redis
>>> filter = redis.bf().create("bloom", 0.01, 1000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'redis' has no attribute 'bf'

Solution:

>>> from redis import Redis
>>> r = Redis()
>>> bf = r.bf()
>>> bf.create("bloom", 0.01, 1000)
True

I am facing similar issue with TopK filters as well.

I can raise a PR to solve this issue as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions