1

A classic. One wants to submit multiple optional search/filter criteria. e.g. "Return all only cats" would result in Animals.find(Animals.type == "cat").all(). Great, but what if one wants to optionally filter by age. One needs another if-statement with another query string combination. Hence, one ends up with a combination of all optional search criteria. I think it is more elegant to compose the complete search criteria. As shown in this redis search example. How would we elegently solve this in redis-om ?

There are examples, but they don't cover the case of composing multiple optional search criteria. https://github.com/redis/redis-om-python/blob/main/docs/fastapi_integration.md

feder
  • 1,849
  • 2
  • 25
  • 43

1 Answers1

0

It seems RedisOM-Python is not ready to support creating dynamic query conditions.

Since RedisOM uses RediSearch as search engine, I'll use redisearch to do data filtering directly.

Good luck!

Lukelu
  • 1