Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
When I nest a collection, I need to run a reindex the relationships
on that object. This is the back-end work for indexing the nested relationships. It relates to #1512.
This reindex can be a rather slow going affair, so it should run
outside of the request cycle.
Ensure that we don't update the preservation document within the indexer or job (only the index)
[ ] Propose the reversal of the Collection to Collection
relationship's direction. This was initially proposed in the
2017-8-23 Samvera Tech Call (Agenda 2.a). Work has begun on
the relationship reversal in Hydra::PCDM, but was set aside
in an effort to incorporate samvera-nesting_indexer. This is Jeremy: I thought I would have more time during the Collections Extension sprint to reverse the relationship, but I didn't. I instead focused on creating the Samvera::NestingIndexer gem from CurateND's effort.
When I nest a collection, I need to run a reindex the relationships on that object. This is the back-end work for indexing the nested relationships. It relates to #1512.
The next steps are:
Samvera::NestingIndexer.reindex_relationships
. You'll need to make sure this is run after we save the Fedora object (and even write to the index). See What happens when I deposit something?samvera-nesting_indexer
. This is Jeremy: I thought I would have more time during the Collections Extension sprint to reverse the relationship, but I didn't. I instead focused on creating the Samvera::NestingIndexer gem from CurateND's effort.Hyrax::Adapters::NestingIndexAdapter.each_perservation_document_id_and_parent_ids
. This is a possibly non-trivial task as we may want to yielddocument_id
andparent_ids
in a very deliberate order based on the implementation details of Samvera::RepositoryReindexer::NestingIndexer.Reverse Relationship Todo Items
If we agree to change the direction of the relationship:
Hydra::PCDM
gemHydra::Works
gemHyrax::Collections::NestedCollectionPersistenceService
If we do not agree to change the direction of the relationship:
If we delay on changing directions until after we've wired in the indexer and deployed to production code: