Skip to content

Conversation

@haarg
Copy link
Member

@haarg haarg commented Nov 5, 2024

Normalize pagination to use page and page_size parameters rather than sometimes from or size.

Add limits to 10000 max results, returning early rather than sending queries to Elasticsearch.

Always accept page and page_size parameters, and pass them around
internally in that order.

Some end points were accepting size rather than page_size. Support both
parameters for these, prioritizing page_size.

The search end points were accepting a from parameter rather than page.
Add support for a page parameter, and convert the from param into the
page as a fallback.
mickeyn
mickeyn previously approved these changes Nov 5, 2024
Paged results are expensive to compute on Elasticsearch. It will refuse
to give results if paged forward far enough.

Limit our pagination and give empty results if paged too deep.
@haarg haarg force-pushed the haarg/normalize-limit-pagination branch from 4814f61 to 453f770 Compare November 5, 2024 09:54
@haarg haarg merged commit 2633bba into master Nov 5, 2024
1 check passed
@haarg haarg deleted the haarg/normalize-limit-pagination branch November 5, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants