-
-
Notifications
You must be signed in to change notification settings - Fork 158
Question: backwards paging #643
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
Comments
AFAIK this fails, and if it does, it would be "n-5"th page. @maurei ? |
Backward paging is supported. Effectively it means pagination starts at the end of a result set and moves "backwards" from there, as opposed from moving forward at the beginning of a result set. Example: Assume "Normal" forward paging would yield
Backward paging would start at the end. It would field
Note: the page numbers are based-1, so there is no zero-th page.
Request scopes are stateless: there is no connection between different request scopes. As such there is no such thing as a "current position" relative to a preview request. The requested position is always specified by the client by including the page number (where omitting that parameter implies the first page) Let me know if that answers your question |
Interesting. So it actually reverses the order of all individual items, instead of specifying an offset that is relative from the last page number. Thanks for the thorough explanation! |
So this is identical to sorting in descending order, right? |
Description
Recently
IPageService.Backwards
was introduced. As I'm implementing my own paging (via Elasticsearch), I wonder what this is intended for and how it can be used.It would allow for a URL like
/api/users?page[number]=-5
, but what does that mean? My first thought was to interpret it as "5 pages back from the current position". But the absolute page offset is 1, unless specified explicitly in the url, which would defeat the purpose of having a relative offset....
Environment
latest master branch
The text was updated successfully, but these errors were encountered: