Relation search on item page - no results

40 views
Skip to first unread message

Johannes Schultze

unread,
Mar 24, 2023, 10:54:53 AM3/24/23
to dspace...@googlegroups.com
Hello everyone,

sorry about the cross-post, but I assumed that the development list might be the better place for this question.

I'm still trying to see clearly if this is an issue with DSpace or DSpace CRIS - but maybe we are just stuck with some configuration, so I will try to describe this in a general way.

We set up new DSpace (CRIS) 7 installations and configured the entity model. After that some relations between items were set up. When we now view the item page, the search results on the bottom of the page return no result although the relations exists. So for example:



(We added a temporary list on top ("Publikationen") to check the existing relations, although they are based on "isPublicationOfAuthor" not on "isAuthorOfPublication" as the empty search results below).

The search result tab configuration is not changed (and should be the same in DSpace and DSpace CRIS):

<ds-tabbed-related-entities-search  [item]="object"
                                    [relationTypes]="[{
                                      label: 'isAuthorOfPublication',
                                      filter: 'isAuthorOfPublication',
                                      configuration: 'default-relationships'
                                    }]">
</ds-tabbed-related-entities-search>

The problem with the search seems to be, that the resulting search requests towards the Solr look for the index field "isAuthorOfPublication", but the relations are indexed in a field called "relation.isAuthorOfPublication".

If we try to change the tab configuration to the "correct" field ...

<ds-tabbed-related-entities-search  [item]="object"
                                    [relationTypes]="[{
                                      label: 'isAuthorOfPublication',
                                      filter: 'relation.isAuthorOfPublication',
                                      configuration: 'default-relationships'
                                    }]">
</ds-tabbed-related-entities-search>

... we of course get an error from DSpace, as there is only a filter configuration for the indexFieldName "isAuthorOfPublication" (-> "searchFilterIsAuthorOfPublicationRelation") but not for "relation.isAuthorOfPublication" in [dspace]/config/spring/api/discovery.xml

Assuming that the DSpace backend would add another "relation."-prefix if we configured a new filter for "relation.isAuthorOfPublication" (thus becoming "relation.relation.isAuthorOfPublication"), we did not try that.

So, the final question: is there a general mismatch between the DSpace backend automatically adding "relation." to the index field and the Solr queries from the frontend not including this prefix - or are we just missing some configuration in one of the two components?

Regards
Johannes


-- 
Dipl. Inf. Johannes Schultze
Gesellschafter / Entwicklung

Tel. +49 40 60940857-5
Fax. +49 40 60940857-1
schu...@effective-webwork.de    
effective WEBWORK GmbH
Neuer Wall 18
20354 Hamburg
http://www.effective-webwork.de

GF Dr. Matthias Finck
HRB 101108 (Hamburg)
UStId DE254169943

DSpace Developers

unread,
Mar 24, 2023, 11:03:38 AM3/24/23
to DSpace Developers
Hi Johannes,

I can verify this all works in out-of-the-box DSpace 7.  You can see these "isAuthorOfPublication" style embedded searches on our demo site.  

Here's a Person entity linked to many Publication entities:

Additionally, the DSpace 7 code appears to use the the first example:

So, either this is a bug in DSpace-CRIS, or something is wrong in your configuration/custom code.  You may want to use the troubleshooting guide to see if there are more detailed errors occurring behind the scenes: https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

Tim

J Schultze

unread,
Mar 24, 2023, 11:23:03 AM3/24/23
to DSpace Developers
Hi Tim,

thanks for the link and the verification that this feature should work fine. I'll try to set it up again on a standard DSpace 7 and move forward to a CRIS Installation after I get a correct result.

Johannes

Reply all
Reply to author
Forward
0 new messages