invenio-app-rdm
invenio-app-rdm copied to clipboard
services: expose metrics in result objects
We should not use the private field _results
of the RecordList
object. This field is encapsulated by the object and exposed through public properties such as aggregations
. However, only labelled facets of the results are exposed as aggregations
.
To support other aggregations, i.e. metric aggregations, we'd need to either (1) extend the RecordList
class to support it or (2) modify the existing aggregations
property.
For (1), it was hard for me to implement since the DSL AggResult
object does not differentiate the aggregations. I believe we'd need something more custom and, IMO, it looks like a feature on its own.
For (2), it's easier to implement but modifies the existing feature.
That being said, I went with using the private field directly - which is not ideal - to unblock the development until we decide which route we want to take.
Originally posted by @alejandromumo in https://github.com/inveniosoftware/invenio-app-rdm/pull/2598#discussion_r1507424054
This issue was automatically marked as stale.