Discover results embeds all item metadata

40 views
Skip to first unread message

Alfeu Uzai Tavares

unread,
Nov 28, 2024, 12:41:10 PM11/28/24
to DSpace Technical Support
Dear community,

We are testing configurable entities in our repository.
Some of the OrgUnits will have many publications, ranging from 1k to 5k. When such OrgUnits are listed in a search result, or while browsing their owning collection, the page loads very slowly.

Inspecting the network tab in the browser I found that the JSON response from the discover API embeds all the entity metadata, with huge lists for the relation.isPublicationOfOrgUnit metadata field.

The same behavior occurs in the DSpace demo. You can check the result of this search, where the OrgUnit has a list with 100 entries of
relation.isPublicationOfOrgUnit values.

Is it possible to configure the discover to not embed this particular metadata field?

Best regards,
Alfeu U. Tavares

Alfeu Uzai Tavares

unread,
Dec 3, 2024, 8:49:12 AM12/3/24
to DSpace Technical Support
Hello everyone,

After further investigating I have found that the problem is in the back-end.
Every time a REST response of an Item object is returned, there are calls to ItemService#getMetadata method, which then calls RelationshipService#getRelationshipMetadata.
This last method will query the database for all metadata in the relation schema related to the item.

I tried creating my own Projetcion class and adding metadata.hidden.relation.isPublicationOfOrgUnit = true  in local.cfg.
In both cases the relation metadata is successfully omitted from the REST response, however the method calls above still occurs, causing the slow response of the pages.
I don't see any way to overcome this problem.

Does anyone have a DSpace (7.6x or 8.x) instance with entities and many relationships facing this issue?
Reply all
Reply to author
Forward
0 new messages