redis / redis-vl-python

Redis Vector Library (RedisVL) interfaces with Redis' vector database for realtime semantic search, RAG, and recommendation systems.
https://www.redisvl.com/
MIT License
223 stars 35 forks source link

Redis Modules Identification missing for "searchlight" version of search module #226

Closed bsbodden closed 3 weeks ago

bsbodden commented 3 weeks ago

When we do a check for capabilities we should also check for the module named "searchlight" which is present instead of "search" in certain deployments image

bsbodden commented 3 weeks ago

We already have the constant for it:

DEFAULT_REQUIRED_MODULES = [
    {"name": "search", "ver": 20600},
    {"name": "searchlight", "ver": 20600},
]

There are two call to validate_modules like:

validate_modules(installed_modules, [{"name": "search", "ver": 20810}])

My concern is the version number in the defaults being 20600 versus the 20810 being used in index.py

Potentially I simple fix would be to have a way to do an OR in, e.g. passing a flag (bool):

def validate_modules(
    installed_modules: Dict[str, Any],
    required_modules: Optional[List[Dict[str, Any]]] = None,
) -> None:

or, introduce an alias like:

DEFAULT_REQUIRED_MODULES = [
    {"name": "search", "alias": "searchlight", "ver": 20600},
]

assuming that it is safe to equate "search" and "searchlight"

@tylerhutcherson @justin-cechmanek @rbs333

tylerhutcherson commented 3 weeks ago

Following up on this thread -- the simple solution is to provide the additional searchlight module+version as another item in the list passed to validate_modules. That method does a check to see if either/or of the items in the provided list are present. Otherwise, an exception is raised.

tylerhutcherson commented 3 weeks ago

Fixed here --> https://github.com/redis/redis-vl-python/pull/227

hassan-baig commented 3 weeks ago

I'm seeing the following issue

It's Mac M1 Pro. Redis is running on Docker, I also tried directly.

I'm on the latest package 0.3.4

ERROR - app.services.events.event_manager.EventManager: Unexpected error in __event_listener: Required Redis db module search >= 20600 OR searchlight >= 20600 not installed. See Redis Stack docs at https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/.