redis / redis-py

Redis Python client
MIT License
12.4k stars 2.48k forks source link

Make it possible to return raw fields in search results #3256

Open gerzse opened 1 month ago

gerzse commented 1 month ago

Pull Request check-list

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

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

Description of change

In some use cases (e.g. vector search), the fields in the search results must not be decoded. Add an optional parameter to the search methods, which makes it possible to disable decoding.

In order to not break the existing functionality, the parameter has the default value set to True, i.e. it will decode like before.

Fixes #2772

bsbodden commented 1 month ago

@gerzse I would reference the original bug report in the PR https://github.com/redis/redis-py/issues/2772

Otherwise it looks good to me! Other than run the linters locally to appease the formatting gods!