Igor Montella
Igor Montella

Reputation: 100

How to use COUNT option with Redis Repositories (GeoOperations)

I'm using Spring Data Redis with Geospatial Index. Every query method work. I would like to use the COUNT option, but I didn't find any more complex example in the documentation. Does anyone knows how to use the COUNT option at this context?

Upvotes: 1

Views: 991

Answers (1)

Christoph Strobl
Christoph Strobl

Reputation: 6736

You can use Pageable to limit results. Staying on page 0 with e.g. Pageable.of(0, 10) limits the results to 10. However the number of items per page is not passed on to the COUNT option of the GEORADIUS command.
I've opened DATAREDIS-666 for this.

Upvotes: 1

Related Questions