clarin-eric / fcs-sru-aggregator

CLARIN Federated Content Search v3 Aggregator – Augmenting your Search Engine
GNU General Public License v3.0
7 stars 2 forks source link

Expose numberOfRecords via REST API (search results) #72

Open Querela opened 1 year ago

Querela commented 1 year ago

Idea: Expose the numberOfRecords SRU searchRetrieve field in the REST API for search results.

Why: This would allow the frontend to better handle loading more results for single resources. I.e. resources that have already sent all their resources would not show this option to the user that in the end will only show that the endpoint can not provide more results (while this information already exists in the initial search response).

Concerns:

  1. Endpoints might not always correctly set this field. Maybe due to not knowing how many results that can provide in total beforehand (result set might grow?).
    Solution: show button to force request more results with hint that all results should already be present. For FCS 2.0 there is already a field resultCountPrecision that should help with interpreting the numberOfRecords field but once again this can still be misconfigured.
Querela commented 1 year ago

Related: https://github.com/clarin-eric/fcs-sru-client/issues/1

Querela commented 1 year ago

See commit: 621a8b76b8834f6ef828f546cfe644e1582c3e6e