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 semantic facet requests #161

Closed
3 of 4 tasks
brent-hartwig opened this issue May 28, 2024 · 3 comments
Closed
3 of 4 tasks

Paginate semantic facet requests #161

brent-hartwig opened this issue May 28, 2024 · 3 comments
Assignees
Labels
Awaiting Review The issue has been deployed and a review is required to close it. external api change facet performance semantic system availability

Comments

@brent-hartwig
Copy link
Contributor

brent-hartwig commented May 28, 2024

Same as #160 but for semantic facets.

Problem Description:

Each facet request returns all of the facet's values, leading to requests taking longer than necessary to process, response sizes being larger than necessary, and contributing to system instability. This ticket's scope is limited to semantic facets.

Expected Behavior/Solution:
Paginate facet requests. Default to 20 facet values. Impose a maximum of 100 values per request.

Until the frontend and middle tier implement facet pagination, the frontend will be limited to the first page of facets, as defined by the backend.

Requirements:
Enable backend endpoint consumers to specify the page and page length. Default to page 1 with a page length of 20.

Needed for promotion:
If an item on the list is not needed, it should be crossed off but not removed.

- [ ] Wireframe/Mockup - Mike
- [ ] Committee discussions - Sarah
- [ ] Feasibility/Team discussion - Sarah

- [ ] Questions
- List of questions for discussions. Answers should be documented within the issue.

UAT/LUX Examples:

  • Example endpoints from LUX to use for development and testing, if applicable.

Dependencies/Blocks:

  • Blocked By: Nothing
  • Blocking: The associated frontend and middle tier tickets.

Related Github Issues:

#160: Same ticket but for non-semantic facets.
#162: Performance test targeting #160 if not also #161

Related links:

None

Wireframe/Mockup:
Place wireframe/mockup for the proposed solution at end of ticket.

@clarkepeterf
Copy link
Contributor

clarkepeterf commented Jun 14, 2024

Plan from Team Meeting 06/14/2024:

  • Allow facets to request up to 10000 values per page
  • Remove first property from facets

@jffcamp jffcamp added the blocking Issue blocks the progress of other repo issues. label Jun 21, 2024
@prowns prowns added this to the Deployment 2024-07-08 milestone Jun 21, 2024
clarkepeterf pushed a commit that referenced this issue Jun 27, 2024
brent-hartwig added a commit that referenced this issue Jun 27, 2024
clarkepeterf pushed a commit that referenced this issue Jun 28, 2024
clarkepeterf pushed a commit that referenced this issue Jun 28, 2024
brent-hartwig added a commit that referenced this issue Jul 1, 2024
* 160: facets endpoint now supports option page and pageLength parameters.  Said parameters have been implemented for non-semantic facets.  Removed some obsolete and extraneous code related to previously supporting multiple facets per request and allowing a search request to also request facets.

* 161 - add pagination to via-search facets

* 161 - add info about totalItems and next/prev pages to the facets response

* add ability to sort non-semantic facets

* update simple search to use referenceName instead of referencePrimaryName - also update the advanced search Name fields to use *Name instead of *PrimaryName - except for setPrimaryName because that needs a new index

* #160 and #161: documented the facet endpoint's new sort parameter (non-semantic facets only).

* 161 - update non-semantic facets to allow up to 10000 results; remove 'first' property from facet response

* #160 and #161: updated facets library to better reflect only one facet is being processed per request.

* Pagination params checked before passing pageLength into Math.min.

* Facet API documentation updates

* 161 - add comment giving background for pagination changes

* update changelog for 161 and 100

* Worked over more variable names within the facets library.  Moved comment explaining recent changes.  Restored and added comments.  Passed smoke testing

---------

Co-authored-by: Peter Clarke <peter.clarke@yale.edu>
Co-authored-by: Brent Hartwig <brent_d_hartwig@hotmail.com>
brent-hartwig added a commit that referenced this issue Jul 1, 2024
brent-hartwig added a commit that referenced this issue Jul 1, 2024
@clarkepeterf clarkepeterf added Awaiting Review The issue has been deployed and a review is required to close it. and removed blocking Issue blocks the progress of other repo issues. labels Jul 9, 2024
@roamye
Copy link

roamye commented Jul 12, 2024

Approved by UAT

@roamye
Copy link

roamye commented Jul 17, 2024

Closing looks good in PROD

@roamye roamye closed this as completed Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Review The issue has been deployed and a review is required to close it. external api change facet performance semantic system availability
Projects
None yet
Development

No branches or pull requests

5 participants