Details
-
Story
-
Status: Open (View Workflow)
-
P4
-
Resolution: Unresolved
-
None
-
None
-
None
-
customfield_11100 56516
-
Core: Platform
-
TBD
Description
Sprint from https://issues.folio.org/browse/RMB-724.
Make the totalRecords calculation method configurable.
When passing a query parameter with a CQL query RMB always calculates totalRecords using the algorithm explained on https://github.com/folio-org/raml-module-builder#estimated-totalrecords . The totalRecords calculation takes some time and the result is not needed by all clients.
Add a totalRecords parameter with these options:
- exact: calculates the exact hit count, this may take long
- estimated: only returns the estimation from PostgreSQL
- none: the client doesn't need any totalRecords value
- auto: the default, uses the exactCount threshold and either returns an estimation or the exact hit count, for details see https://github.com/folio-org/raml-module-builder#estimated-totalrecords An additional parameter minExactCount=3000 can be used to overwrite the modules default that usually is 1000, for example query=title=Bee&totalRecords=auto&minExactCount=3000.
RMB-724 has implemented auto and none since RMB 33.2.0.
This Jira is for the remaining task: implement exact and estimated.