phaidra / phaidra-api

RESTish API to Phaidra
Apache License 2.0
6 stars 4 forks source link

Inactive pids are indexed in relationship fields of the object's Solr record #68

Open giulioturetta opened 2 years ago

giulioturetta commented 2 years ago

Indexing of the following relationships should perform a check on the object's state before populating the matching field in the Solr index:

info:fedora/fedora-system:def/relations-external#hasCollectionMember
http://pcdm.org/models#hasMember
http://purl.org/dc/terms/references
http://phaidra.org/XML/V1.0/relations#isBackSideOf
http://phaidra.univie.ac.at/XML/V1.0/relations#hasSuccessor
http://phaidra.org/XML/V1.0/relations#isAlternativeFormatOf
http://phaidra.org/XML/V1.0/relations#isAlternativeVersionOf

Example object o:429192 for hasCollectionMember relationship

Solr record of pid o:429192 contains "ispartof":["o:429576","o:445579"]

FOXML of object o:445579 contains <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Inactive"/>

Triple store content:

<info:fedora/o:429576> <info:fedora/fedora-system:def/relations-external#hasCollectionMember> <info:fedora/o:429192> .
<info:fedora/o:445579> <info:fedora/fedora-system:def/relations-external#hasCollectionMember> <info:fedora/o:429192> .

Worth checking if the same issue might happen for Deleted collection objects too (and what about non-existing pids?).