Skip to content

Conversation

@Spartee
Copy link
Contributor

@Spartee Spartee commented Aug 16, 2023

Add a FilterQuery class for running just a query with a filter and no vector search in the case where the user needs to do this and should not have to also use Redis-py

Example

>>> from redisvl.query import FilterQuery
>>> from redisvl.query.filter import Tag
>>> t = Tag("brand") == "Nike"
>>> q = FilterQuery(return_fields=["brand", "price"], filter_expression=t)

@Spartee Spartee added enhancement New feature or request query query or filter related labels Aug 16, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #51 (c31ba8e) into main (0c619f4) will decrease coverage by 0.04%.
The diff coverage is 73.52%.

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   87.12%   87.08%   -0.04%     
==========================================
  Files          15       15              
  Lines         730      751      +21     
==========================================
+ Hits          636      654      +18     
- Misses         94       97       +3     
Files Changed Coverage Δ
redisvl/query/filter.py 95.45% <ø> (ø)
redisvl/schema.py 90.58% <0.00%> (ø)
redisvl/vectorize/text/openai.py 76.56% <42.85%> (ø)
redisvl/vectorize/text/huggingface.py 82.35% <66.66%> (ø)
redisvl/query/query.py 87.69% <85.71%> (-0.95%) ⬇️
redisvl/query/__init__.py 100.00% <100.00%> (ø)

Copy link
Collaborator

@tylerhutcherson tylerhutcherson left a comment

Choose a reason for hiding this comment

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

LGTM!

parser.add_argument(
"-a", "--password", help="Redis password", type=str, default=""
)
parser.add_argument("-a", "--password", help="Redis password", type=str, default="")
Copy link
Collaborator

Choose a reason for hiding this comment

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

we will eventually need to add TLS support here in the form of a path to the server CA, and client/user certs (public and private) too. With the bedrock launch coming, it would be great to push users here for an easier onboarding :)

@Spartee Spartee merged commit 9b5a13a into main Aug 21, 2023
@Spartee Spartee deleted the filterquery branch August 21, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request query query or filter related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants