Closed aaxelb closed 6 years ago
Look at a work's IsPartOf relationship as its parent work, and include the closest three ancestors in elasticsearch at lists.lineage.
IsPartOf
lists.lineage
Given several works with lineage:
Deeply > Nested > Components > To > Make > A > Good > Long > Lineage
The "Long" work will be indexed with:
"lineage": [ { "identifiers": [ "urn://share/io.osf:83u96", "http://staging-api.osf.io/v2/nodes/83u96/", "http://staging.osf.io/83u96/" ], "type": "project", "title": "Make", "types": [ "project", "publication", "creative work" ], "id": "3314A-94F-6B8" }, { "identifiers": [ "urn://share/io.osf:3zmxy", "http://staging-api.osf.io/v2/nodes/3zmxy/", "http://staging.osf.io/3zmxy/" ], "type": "project", "title": "A", "types": [ "project", "publication", "creative work" ], "id": "3306B-E73-7C9" }, { "identifiers": [ "urn://share/io.osf:ay67d", "http://staging-api.osf.io/v2/nodes/ay67d/", "http://staging.osf.io/ay67d/" ], "type": "project", "title": "Good", "types": [ "project", "publication", "creative work" ], "id": "3322F-F86-A2F" } ]
Also, tidy up the work fetcher SQL to make it slightly more friendly.
https://openscience.atlassian.net/browse/SHARE-1000
Look at a work's
IsPartOf
relationship as its parent work, and include the closest three ancestors in elasticsearch atlists.lineage
.Given several works with lineage:
The "Long" work will be indexed with:
Also, tidy up the work fetcher SQL to make it slightly more friendly.
https://openscience.atlassian.net/browse/SHARE-1000