I have a simple repository
@Repository
public interface SurgeryIndexRepository extends ElasticsearchRepository<SurgeryIndexEntity, UUID> {}
When I call the search method like this surgeryIndexRepository.search(query, pageable) I get a Page response with totalPages = 1, numberOfElements=40, totalElements=7200.
Something is wrong with the totalPages, I should have 180.
My Pageable is Page request [number: 0, size 40, sort: date: DESC]
I'm using Maven: org.springframework.data:spring-data-elasticsearch:3.0.6.RELEASE
This problem has been resolved in 3.0.7 : https://jira.spring.io/browse/DATAES-402, we were using 3.0.6, so just upgraded to current release version 3.0.8.RELEASE and it solved the problem.
Another reference to this problem : elasticsearch: return TotalPages not correct
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With