ietf-tools / datatracker

The day-to-day front-end to the IETF database for people who work on IETF standards.
https://datatracker.ietf.org
BSD 3-Clause "New" or "Revised" License
602 stars 367 forks source link

Document search limit of 200 should be per group #5402

Open kivinen opened 1 year ago

kivinen commented 1 year ago

Describe the issue

When you go to the https://datatracker.ietf.org/ search and fill in "draft" as search item, you get 1 active internet-draft and 199 RFCs.

My guess is that the RFC limit is set to less than 200, returning 199, and then next search is for drafts, and fills in the last spot with the one active draft.

I think the limit (200 in this case) should be per group (and the limit could be bit lower, like 100) for each group separately, so it would return 100 rfcs, 100 active drafts, 100 expired drafts etc.

Then there should be a way that if you have only one group visible (i.e, select only RFCs) you should be able to see all of the items, either by loading them on the fly, or with next page button (if we are going to show 10000 drafts we do not want to put them in one huge page). I will make separate ticket for this issue, so this ticket should only concentrate fixing the current code so its limit is per group.

Code of Conduct

rjsparks commented 1 year ago

These limits are not just about making big page results. They are also about not making massive database queries. There is a single query right now, with a limit passed to the database. To follow this proposal, that would have to be broken into multiple queries and the results merged.

kivinen commented 1 year ago

Robert Sparks writes:

These limits are not just about making big page results. They are also about not making massive database queries. There is a single query right now, with a limit passed to the database. To follow this proposal, that would have to be broken into multiple queries and the results merged.

Or do sorting in the database query, and use limit and offset in the query. Not sure how that is done in django though, in raw sql, I have used SELECT ... ORDER BY ... LIMIT 200 OFFSET 400; etc. -- @.***

rjsparks commented 1 year ago

See also #5403