Closed jcoyne closed 9 years ago
I thought about this more overnight. I would propose the rename of #collections, which currently returns all child collections of a collection, be renamed to #child_collections. This is inline with the parent-child terminology used in the services and will work better at all levels (e.g. #child_generic_works is more intuitive than #subgeneric_works).
To be consistent, similar changes need to be made at all levels of the model in pcdm and hydra works.
@elrayle they are now child_collections
. I can update the other gems, once this PR is merged.
I like that the solr tests were moved out of the service tests.
I don't work with solr much, so the following are observations and questions to help me understand that this is setup the way we want.
ObjectIndexer
NOTE: objects_ssim should become child_objects_ssim and #objects should become #child_objects.
CollectionIndexer < ObjectIndex
The parent ids aren't indexed. Are these relationships inferred from the other indexed ids? With the way this is written, can you retrieve the all parents of an object that lives in multiple collections? Or is this work still in progress?
We do not want to index parent collections. We can infer the relationship by doing a solr join and it's challenging to find parents just by looking at LDP.
Collection#collections used to return collections that contained this object (parent collections, see https://github.com/projecthydra/hydra-collections/blob/master/lib/hydra/collections/collectible.rb#L10 ) but now collections returns child collections. This renaming hopes to reverse the incompatible naming change.