redis / redis-om-python

Object mapping, and more, for Redis and Python
MIT License
1.06k stars 108 forks source link

Limit fields to return with RETURN keyword #568

Open DennyD17 opened 9 months ago

DennyD17 commented 9 months ago

Hello! Is there an ability to limit fields returning by model query (by RedisSearch's RETURN keyword)? If not --- can you please add this task to the backlog? Something like "fields" and "exclude" methods would be great!

And another one question. I've added RETURN functionality to pagination property. And now I have some problems with serialisation: Redis search returns results in format different than "regular" ( ["$", '{"json": "foo"}')] and as a result I have JsonModel with json strings into fields. My crutch - override init of model to try to json.loads each init value. Any good suggestions?