redis-py icon indicating copy to clipboard operation
redis-py copied to clipboard

Add payload feature in RediSearch Query class

Open shcho1118 opened this issue 2 years ago • 2 comments

Pull Request check-list

Please make sure to review and check all of these items:

  • [ ] Does $ tox pass with this change (including linting)?
  • [ ] Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • [x] Is the new or changed code fully tested?
  • [ ] Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • [ ] Is there an example added to the examples folder (if applicable)?
  • [ ] Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Simple fix to use RediSearch hamming distance on redis-py Hamming distance needs payload but redis-py Query class doesn't have that feature. I know that there are some hacky solutions (e.g. #2502) and the payload feature is deprecated in RediSearch 2.0. However, since hamming distance still requires payload, I open this PR.

shcho1118 avatar Mar 03 '23 05:03 shcho1118

Codecov Report

Patch coverage: 50.00% and project coverage change: -0.04 :warning:

Comparison is base (6c708c2) 92.31% compared to head (526dc66) 92.27%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2603      +/-   ##
==========================================
- Coverage   92.31%   92.27%   -0.04%     
==========================================
  Files         115      115              
  Lines       29744    29750       +6     
==========================================
- Hits        27459    27453       -6     
- Misses       2285     2297      +12     
Impacted Files Coverage Δ
redis/commands/search/query.py 92.18% <50.00%> (-1.37%) :arrow_down:
tests/conftest.py 84.94% <0.00%> (-0.78%) :arrow_down:
redis/asyncio/cluster.py 91.68% <0.00%> (-0.33%) :arrow_down:
tests/test_asyncio/test_pubsub.py 99.37% <0.00%> (-0.16%) :arrow_down:
tests/test_asyncio/test_cluster.py 97.48% <0.00%> (-0.13%) :arrow_down:
tests/test_cluster.py 96.86% <0.00%> (-0.11%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Mar 03 '23 05:03 codecov-commenter

This pull request is marked stale. It will be closed in 30 days if it is not updated.

github-actions[bot] avatar Mar 13 '24 00:03 github-actions[bot]