Not all model types are saved to the Valkyrie Solr core
Descriptive summary
When writing to Valkyrie's solr is enabled, not all model types that are saved through ActiveFedora to ActiveFedora managed solr core are also saved to the Valkyrie solr core.
Rationale
Although some model types are ActiveFedora specific and are ok to not include in the Valkyrie solr core, any model type related to content should be saved in the Valkyrie solr core.
Expected behavior
Expected results when testing with seed data that creates 1 admin set, 9 collections, 5 Publication works, and 5 Release works each with 3 files.
| has_model_ssim | Count in AF solr core | Count in Valkyrie solr core | Different from Actual? |
|---|---|---|---|
| AdminSet | 1 | 1 | Actual has 0 |
| Collection | 9 | 9 | |
| Generic Work (work) | 5 | 5 | |
| FileSet | 15 | 15 | Actual has 0 |
| Hydra::AccessControls::Permission | 228 | - | per Issue #4767, AF specific |
| Hydra::AccessControl | 35 | - | per Issue #4767, AF specific |
| ActiveFedora::Aggregation::Proxy | 30 | - | |
| ActiveFedora::IndirectContainer | 19 | - | |
| ActiveFedora::DirectContainer | 15 | - | |
| ActiveFedora::Aggregation::ListSource | 5 | - |
Actual behavior
Actual results when testing with seed data that creates 1 admin set, 9 collections, 5 Publication works, and 5 Release works each with 3 files.
| has_model_ssim | Count in AF solr core | Count in Valkyrie solr core |
|---|---|---|
| AdminSet | 1 | - |
| Collection | 9 | 9 |
| Generic Work (work) | 5 | 5 |
| FileSet | 15 | - |
| Hydra::AccessControls::Permission | 228 | - |
| Hydra::AccessControl | 35 | - |
| ActiveFedora::Aggregation::Proxy | 30 | - |
| ActiveFedora::IndirectContainer | 19 | - |
| ActiveFedora::DirectContainer | 15 | - |
| ActiveFedora::Aggregation::ListSource | 5 | - |
Resolution
Each solr doc type is addressed in a separate issue.
Model types that need solr doc for Valkyrie:
- [ ] AdminSets (Issue #4765)
- [x] FileSets (Issue #4766) - addressed in PR #4780
Model types that already have solr doc for Valkyrie:
- Collection
- Work
Model types that are ActiveFedora specific and don't require a solr doc for Valkyrie:
- ActiveFedora::Aggregation::Proxy
- ActiveFedora::IndirectContainer
- ActiveFedora::DirectContainer
- ActiveFedora::Aggregation::ListSource
- Hydra::AccessControls::Permission
- Hydra::AccessControl
Related work
Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
it might be nice to tackle this with a more feature-oriented approach. do all of these solr documents stored by ActiveFedora get used in Hyrax? if so, what features do they support?
for some of these (e.g. ActiveFedora::IndirectContainer) there's no corresponding concept in Valkyrie. do we want to invent one to populate the index?
My inclination is to make sure we have the ones we know are needed. Then when we test turning off ActiveFedora, see if anything breaks. But I'm not opposed to a more proactive analysis of how Hyrax uses the ones marked AF specific.