I’m using Redis OM for spring boot, I am having trouble querying objects because it only returns the first 10 records.
Repository Class:
public interface RedisBillerRepository extends RedisDocumentRepository<Biller, Long> {
List<Biller> findByClientIds(String clientId);
}
Is there a way to return ALL the objects with the specific clientId? Not the first 10 only.
2
Answers
The only way which i found was with the interface Page. For example your Repository would look like this:
And your class could look like this
}
You have to set the limit for now.
I’m the author of the library… @member2 is correct. RediSearch currently has a default for the underlying
FT.SEARCH
(https://redis.io/commands/ft.search/) method of returning the first 10 records found. To override that, the only way to do so currently is to use the Pagination constructs in Spring.I will expose a configuration parameter in upcoming versions to set the MAX globally.Now there are officially two ways: