-
Notifications
You must be signed in to change notification settings - Fork 66
Add beta pagination feature #798
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0672474 to
7010569
Compare
…isearch into pagination-beta
…isearch into pagination-beta
src/adapter/search-response-adapter/__tests__/pagination-adapter.tests.ts
Outdated
Show resolved
Hide resolved
| } else if (totalHits !== undefined) { | ||
| return totalHits | ||
| } | ||
| return hitsPerPage * totalPages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to our internal conversation, this will change in the future, right @bidoubiwa ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to our internal conversation, this will change in the future,
What do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that the core team provides a real number of hits we have. Because even we doing a math here we cannot be 100% sure since we may have pages without the whole limit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its the if just above
else if (totalHits !== undefined) {
return totalHits
}
Thats the hit Meilisearch returns. The return is a safe guard in case total hits is missing but it should indeed not happen so I could as well remove it
|
It has been implemented in #878 and released :) |
We would like users to be able to test out our new way to handle pagination before adding it to Meilisearch.
While previously if the user wanted to have a pagination with page number (Ex:
<< < 1, 2, 3, ... > >>) they had to usefinitePagination:trueandpaginationTotalHits.These have been removed as Meilisearch now handles this type of pagination.
The following parameters in the
instantMeiliSearchclient are removed:finitePaginationpaginationTotalHitsSee related issue
See related discussion