Skip to content

Commit

Permalink
update index property docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerhutcherson committed Nov 13, 2023
1 parent c1f9269 commit 9a27571
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions redisvl/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,34 +107,35 @@ def _create_storage(index: IndexModel) -> BaseStorage:
def set_client(self, client: redis.Redis):
self._redis_conn = client

@property
def storage(self) -> BaseStorage:
return self._storage

@property
def storage_type(self) -> str:
return self._index.storage_type

@property
def name(self) -> str:
"""The name of the Redis search index."""
return self._index.name

@property
def prefix(self) -> str:
"""The optional key prefix that comes before a unique key value in forming a Redis key."""
return self._index.prefix

@property
def key_separator(self) -> str:
"""The optional separator between a defined prefix and key value in forming a Redis key."""
return self._index.key_separator

@property
def storage(self) -> BaseStorage:
"""The Storage class that handles all upserts and reads to/from the Redis instances."""
return self._storage

@property
def storage_type(self) -> str:
"""The underlying storage type for the search index: hash or json."""
return self._index.storage_type

@property
@check_connected("_redis_conn")
def client(self) -> redis.Redis:
"""The redis-py client object.
Returns:
redis.Redis: The redis-py client object
"""
"""The underlying redis-py client object."""
return self._redis_conn # type: ignore

@classmethod
Expand Down

0 comments on commit 9a27571

Please sign in to comment.