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

Paginate only after filtering in RssFeeds #69

Open
RafDevX opened this issue Sep 12, 2024 · 0 comments
Open

Paginate only after filtering in RssFeeds #69

RafDevX opened this issue Sep 12, 2024 · 0 comments
Labels
bra första ärende Beginner friendly

Comments

@RafDevX
Copy link
Contributor

RafDevX commented Sep 12, 2024

RssFeeds (wrongly) starts by fetching 100 items from the database and only then filtering them, meaning that the final page size is inconsistent (depends on how many items "survive" the filter).

.findAllPublished(PageRequest.of(0, 100, Sort.by(Sort.Direction.DESC, "publishDate")))

Instead, we should either filter in the database or find some other solution to ensure the page size is always 100 (if >=100 items exist).

@RafDevX RafDevX added the bra första ärende Beginner friendly label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bra första ärende Beginner friendly
Projects
None yet
Development

No branches or pull requests

1 participant