Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor query classes #211

Merged
merged 10 commits into from
Sep 6, 2024
Merged

Conversation

tylerhutcherson
Copy link
Collaborator

In order to support more advanced query params/settings of the Redis query engine, we needed a more flexible and customizable way to build RedisVL queries.

This PR introduces a simple refactor to inherit all redis-py Query module capabilities for each query type.

Source: https://github.com/redis/redis-py/blob/master/redis/commands/search/query.py

Updated user guide is still in flight **

@tylerhutcherson tylerhutcherson added the enhancement New feature or request label Aug 30, 2024
rbs333
rbs333 previously approved these changes Aug 30, 2024
Copy link
Collaborator

@rbs333 rbs333 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM left a couple comments if we want to make a couple things more clear

redisvl/extensions/llmcache/semantic.py Show resolved Hide resolved
redisvl/query/query.py Show resolved Hide resolved
from redisvl.query.filter import Tag
# Initialize the base query with the full query string constructed from the filter expression
query_string = self._build_query_string()
super().__init__(query_string)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should maybe call out somewhere that we are extending the RedisQuery now which is why it is like this

rbs333
rbs333 previously approved these changes Aug 30, 2024
@tylerhutcherson tylerhutcherson merged commit 5f1e046 into main Sep 6, 2024
20 checks passed
@tylerhutcherson tylerhutcherson deleted the feat/RAAE-201/refactor-query-classes branch September 6, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants