Closed staplegun closed 6 years ago
Recognising hierarchy levels:
<TitObjectType>Object</TitObjectType>
(no AssParentObjectRef
element)<TitObjectType>Parent</TitObjectType>
(no AssParentObjectRef
element)<TitObjectType>Object</TitObjectType><AssParentObjectRef>12345</AssParentObjectRef>
Karen, Simon and I are meeting about this on Tuesday, so will get back to you after that date. This may not be resolved until v2.0 which is OK if it is a known issue.
So the consensus here is that we would like the parent and child to both be returned in a search result. The reason being, that there are two kinds of instances where there is a parent/child:
A set - made up of multiple objects, such as a tea set (ie. teapot, saucer, cup), or s suit that is made up of pants and a jacket
A Parts - where on object has many parts that make it up. For example, the teapot with the pot and lid. Or a clock that may have multiple parts to form the one object, or an object that is broken so has two parts, but the object needs to be represented as a whole
With a Set, it makes sense that somebody may wish to retrieve one of the objects in that Set on its own. With a part, it does not make sense to always need to retrieve a part of an object. However we will not be releasing parts unless it makes sense to do so.
So basically, only children that make sense to be searched on their own, will be released to the API.
Hence we think it best that search results include the parent and children, with a way to determine if they have a parent/child.
If that isn't too much extra work? Or we have missed something?
I have removed suppression of child records in Solr. I am ignoring the TitObjectType
field and just processing the AssParentObjectRef
field - if it exists I create a parent/child link both ways:
crm:P46_is_composed_of
/ dc:hasPart
- Childcrm:P46i_forms_part_of
/ dc:isPartOf
- ParentNeed to filter out any records containing <TitObjectType>Pending Object</TitObjectType>
(not strictly part of parent-child work, but closely related)
Pending objects are already filtered out - https://github.com/Conal-Tuohy/NMA-API-ETL/blob/2c3d722d46a49dacf89eba35f29f90fd83b05cc3/filter.xsl#L29
Parent has been added to JSON-LD, but not simple - https://csapi-test.nma.gov.au/object/108547?format=json-ld - part_of
/object/76002
But the reverse child link is not appearing - https://csapi-test.nma.gov.au/object/76002?format=json-ld
Status:
Link from parent to child
part
in json-ld - http://nma-dev.conaltuohy.com/object/76002?format=json-ldhasPart
in simple - http://nma-dev.conaltuohy.com/object/76002?format=simpleLink from child to parent
part
in json-ld - http://nma-dev.conaltuohy.com/object/108547?format=json-ldisPartOf
in simple - http://nma-dev.conaltuohy.com/object/108547?format=simple
A collection item that consists of multiple parts is often described using multiple object records, for example a teapot:
Most searchers are interested in the teapot, so the children parts should be excluded from typical queries. However the teapot record should include links to its children records.
When only a child part is in an exhibition (e.g. just the teapot lid), the parent object should be flagged as being 'on display'.