invenio-app-rdm icon indicating copy to clipboard operation
invenio-app-rdm copied to clipboard

services: expose metrics in result objects

Open slint opened this issue 11 months ago • 1 comments

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

slint avatar Mar 05 '24 14:03 slint

This issue was automatically marked as stale.

github-actions[bot] avatar May 05 '24 06:05 github-actions[bot]