Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible #4487

Closed
elrayle opened this issue Aug 26, 2020 · 3 comments

Comments

@elrayle
Copy link
Contributor

elrayle commented Aug 26, 2020

Descriptive summary

I would expect the solr doc created by Hyrax::ValkyrieWorkIndexer to generate the same set of fields as the ActiveFedora generated solr doc.

Rationale

With both processes producing the same solr doc fields, existing solr indices will not need to be migrated when switching from ActiveFedora to Valkyrie.

Expected behavior

Generated fields would have the same field names and values.

Actual behavior

image

NOTE: Excluded all custom fields in our indexer.

Steps to reproduce the behavior

In my local app, I created a custom indexer which inherits from Hyrax::ValkyrieWorkIndexer. I use the following in a spec to create the publication work which is Valkyrie::Resource, save it, and index it.

  let!(:publication) do
    pub = FactoryBot.valkyrie_create(:publicationr, identifier: identifier)
    solr_doc = PublicationrIndexer.new(resource: pub).to_solr
byebug
    Hyrax::SolrService.new(use_valkyrie: true).add(solr_doc, commit: true)
    pub
  end
  • valkyrie_create saves the work through ActiveFedora creating the ActiveFedora solr doc.
  • Hyrax::SolrService saves the ValkyrieWorkIndexer generated solr doc to a separate solr core.
@elrayle
Copy link
Contributor Author

elrayle commented Aug 26, 2020

Per discussion in Samvera-Tech call today, the diffs reflect work in progress. The path forward is to create PRs that move toward making the Hyrax::ValkyrieWorkIndexer consistent with the AF generated solr doc.

elrayle added a commit that referenced this issue Aug 26, 2020
elrayle added a commit that referenced this issue Aug 26, 2020
elrayle added a commit that referenced this issue Aug 26, 2020
elrayle added a commit that referenced this issue Aug 26, 2020
no-reply pushed a commit that referenced this issue Aug 26, 2020
elrayle added a commit that referenced this issue Aug 29, 2020
no-reply pushed a commit that referenced this issue Sep 2, 2020
elrayle added a commit that referenced this issue Oct 1, 2020
### Background

Most attributes for Hyrax::Work are defined using `Hyrax::Schema` includes.  A few are defined with `attribute` statements.  Some of these attributes were indexed by ActiveFedora.  Adding in indexing for these to be consistent with ActiveFedora’s indexing.

Indexed in AF, but not in ValkyrieWorkIndexer…
* generic_type_sim
* file_set_ids_ssim

Defined as attribute in Hyrax::Work, but not indexed
* on_behalf_of
* proxy_depositor
* state

Looking for confirmation on how to handle these.

### Related Work

Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
elrayle added a commit that referenced this issue Oct 1, 2020
Most attributes for Hyrax::Work are defined using `Hyrax::Schema` includes.  A few are defined with `attribute` statements.  Some of these attributes were indexed by ActiveFedora.  Adding in indexing for these to be consistent with ActiveFedora’s indexing.

Indexed in AF, but not in ValkyrieWorkIndexer…
* generic_type_sim
* file_set_ids_ssim

Defined as attribute in Hyrax::Work, but not indexed
* on_behalf_of
* proxy_depositor
* state

Looking for confirmation on how to handle these.

Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
elrayle added a commit that referenced this issue Oct 1, 2020
Most attributes for Hyrax::Work are defined using `Hyrax::Schema` includes.  A few are defined with `attribute` statements.  Some of these attributes were indexed by ActiveFedora.  Adding in indexing for these to be consistent with ActiveFedora’s indexing.

Indexed in AF, but not in ValkyrieWorkIndexer…
* generic_type_sim
* file_set_ids_ssim

Defined as attribute in Hyrax::Work, but not indexed
* on_behalf_of
* proxy_depositor
* state

Looking for confirmation on how to handle these.

Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
elrayle added a commit that referenced this issue Oct 1, 2020
Most attributes for Hyrax::Work are defined using `Hyrax::Schema` includes.  A few are defined with `attribute` statements.  Some of these attributes were indexed by ActiveFedora.  Adding in indexing for these to be consistent with ActiveFedora’s indexing.

Indexed in AF, but not in ValkyrieWorkIndexer…
* generic_type_sim
* file_set_ids_ssim

Defined as attribute in Hyrax::Work, but not indexed
* on_behalf_of
* proxy_depositor
* state

Looking for confirmation on how to handle these.

Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
no-reply pushed a commit that referenced this issue Oct 1, 2020
Most attributes for Hyrax::Work are defined using `Hyrax::Schema` includes.  A few are defined with `attribute` statements.  Some of these attributes were indexed by ActiveFedora.  Adding in indexing for these to be consistent with ActiveFedora’s indexing.

Indexed in AF, but not in ValkyrieWorkIndexer…
* generic_type_sim
* file_set_ids_ssim

Defined as attribute in Hyrax::Work, but not indexed
* on_behalf_of
* proxy_depositor
* state

Looking for confirmation on how to handle these.

Issue #4487 - Solr docs generated by ActiveFedora and Hyrax::ValkyrieWorkIndexer are not compatible
@elrayle
Copy link
Contributor Author

elrayle commented Mar 16, 2021

Related Issues

Issue #4795 - Hyrax::Works do not show Date Added in Dashboard -> Works
Issue #4788 - Hyrax::Works do not show thumbnail in Dashboard -> Works
Issue #4794 - Hyrax::Works do not index file sets

@elrayle
Copy link
Contributor Author

elrayle commented Apr 30, 2021

This is mostly complete. It appears that permissions is the only part that is not in the Valkyrie solr document. I opened Issue #4901 to cover just that part.

New comparison of the solr docs created by ActiveFedora and Valkyrie indexing...
image

Closing this issue. See Issue #4901 for remaining issue with permissions.

@elrayle elrayle closed this as completed Apr 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant