inveniosoftware / invenio-app-rdm

Turn-key research data management platform.
https://inveniordm.docs.cern.ch
MIT License
100 stars 144 forks source link

services: expose metrics in result objects #2603

Open slint opened 6 months ago

slint commented 6 months ago

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_

github-actions[bot] commented 4 months ago

This issue was automatically marked as stale.