Home > Back-end >  Paging Elasticsearch repository. The search () to obtain the total number of pages is not correct
Paging Elasticsearch repository. The search () to obtain the total number of pages is not correct

Time:02-08

As shown in figure, the page size is 20, the default page is 0 (1-1=0), but get the total leaf number 1

CodePudding user response:

TotalPages said how many data pages, does not represent the current page

CodePudding user response:

reference 1st floor BoRoBoRoMe response:
TotalPages said how many pages of data, does not represent the current page

Yes, 181 data, the total number of pages should be 10, instead of one

CodePudding user response:

refer to the second floor yi enlightened response:
Quote: refer to 1st floor BoRoBoRoMe response:
TotalPages said how many pages of data, does not represent the current page

Yes, 181 data, the total number of pages should be 10, instead of 1.


Because there is no effect, the size should be using this interface
Page Search (criteriabuilder query, Pageable Pageable)

A lot of API, part of the ES parameters not to take effect

CodePudding user response:

Don't know if version problem, I look at the others can use this

CodePudding user response:

reference BoRoBoRoMe reply: 3/f
Quote: refer to the second floor yi enlightenment response:

Quote: refer to 1st floor BoRoBoRoMe response:
TotalPages said how many pages of data, does not represent the current page

Yes, 181 data, the total number of pages should be 10, instead of 1.


Because there is no effect, the size should be using this interface
Page Search (criteriabuilder query, Pageable Pageable)

A lot of API, part of the ES effect parameters not

Don't know if version problem, I look at the others can use this

CodePudding user response:

Has been solved, is cause springboot starter version problem

CodePudding user response:

Brothers, specific how to solve, what version and the version?

CodePudding user response:

refer to the eighth floor oyww123 response:
brother, specific how to solve, what version and the version?

Remember is springboot version and elasticsearch version problem, changed the right version is ok, specifically those version no problem you go online to find out

CodePudding user response:

references a group of maple, 9/f, a reply:
Quote: refer to the eighth floor oyww123 response:
brother, specific how to solve, what version and the version?

Remember is springboot version and elasticsearch version problem, changed the right version is ok, specifically those version no problem you go online to look for

Thank you for your way of thinking, has been solved

CodePudding user response:

references to the tenth floor oyww123 response:
Quote: a group of maple, 9/f, reference a reply:
Quote: refer to the eighth floor oyww123 response:
brother, specific how to solve, what version and the version?

Remember is springboot version and elasticsearch version problem, changed the right version is ok, specifically those version no problem you go online to look for

Thank you for your thoughts, has solved the

You're welcome, it is good to solve!
  • Related