Skip to content
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

Change the pagination #384

Open
karolina-siemieniuk-morawska opened this issue Sep 20, 2023 · 0 comments
Open

Change the pagination #384

karolina-siemieniuk-morawska opened this issue Sep 20, 2023 · 0 comments

Comments

@karolina-siemieniuk-morawska
Copy link
Collaborator

Better, we could improve the API to use a different pagination mechanism and left the 10k result limit in the API. The current mechanism of next links is well-adapted to the recent search_after option in the ES search API (docs only exist for very recent versions, but I've tested it and it seems to work with our current ES version). If you have a stable sort in the API such that the sort value returned is not shared by several documents (this requires using a unique ID such as the UUID or recid as a tie-breaker), you can simply pass the value of the last score on the current page to search_after to get the next page, indefinitely. This seems compatible with the next API links (if treated as opaque URLs, so we could have ?next= instead of ?page=) that we return, so wouldn't break the API, but would probably require some work on invenio-records-rest.

Moved from: inspirehep/inspirehep#2198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant