refactor(api): serve hits.total as an integer - #1187
PascalRepond wants to merge 1 commit into
Conversation
* Serve `hits.total` as the plain integer upstream Invenio returns, and that the projects resource already answers with, in place of the raw search engine object of the records-rest endpoints. * Free the clients from absorbing two shapes of the same count. * Drop the `relation` key, which carried nothing: records-rest asks the search engine for an exact count on every list endpoint, so it was always `eq`. * Part of rero/rero-ils#4220. Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (16)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Walkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The API now returns numeric search totals consistently, with affected API and UI tests updated accordingly; no merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hits.totalas the plain integer upstream Invenio returns, and that the projects resource already answers with, in place of the raw search engine object of the records-rest endpoints.relationkey, which carried nothing: records-rest asks the search engine for an exact count on every list endpoint, so it was alwayseq.hits.totalto a plain integer on all search endpoints rero-ils#4220.