Description
Problems with the current state:
Currently, Spring Data Redis allows indexing POJOs using Redis Sets as described in https://redis.io/docs/manual/patterns/indexes/ . This approach is outdated since the release of RediSearch and has the following limitations:
-
Limited querying capabilities, absence of aggregations, sorting and limiting.
Some of the limitations are described here.
Examples of users struggling with these limitations:- https://stackoverflow.com/questions/44647363/spring-data-redis-repository-doesnt-support-collection-query
- https://stackoverflow.com/questions/54339026/spring-data-redis-sort-order-by
- https://stackoverflow.com/questions/42518900/how-to-build-dynamic-queries-with-spring-data-redis-repositories
- https://stackoverflow.com/questions/45419196/query-nested-objects-in-redis-using-spring-data
-
Spring Data Redis manages indexes, leading to memory overhead, scalability problems and incompatibilities with Redis Cluster.
Some users have to give up on Spring Data Redis because of the problems mentioned here:
Proposed solution:
Introduce new Interfaces and configuration options that allow indexing POJOs with custom Indexers based on RediSearch. Usage of custom Indexers will allow us to solve community issues, overcome the limitations mentioned above, and fine-tune Spring Data Redis for specific use cases.
An example of @Indexed
annotation based on RediSearch can be found here: