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

Index admin set relationship using the same field as ActiveFedora-based works #5563

Merged
merged 2 commits into from
Mar 22, 2022

Conversation

cjcolvar
Copy link
Member

@cjcolvar cjcolvar commented Mar 21, 2022

Fixes #5497

The isPartOf_ssim field is used when searching for works belonging to an admin set.

Hyrax::SolrService.count("{!field f=isPartOf_ssim}#{id}")

Future work:

  • write a feature test
  • change the hardcoded isPartOf_ssim in the line referenced above and the other occurrence in that presenter to use the configuration Hyrax.config.admin_set_predicate.qname.last which is used in the search builder
    solr_parameters[:fq] << "{!term f=#{Hyrax.config.admin_set_predicate.qname.last}_ssim}#{collection.id}"

@elrayle
Copy link
Contributor

elrayle commented Mar 22, 2022

Is there an issue for the suggested future work, especially the change of hardcoded isPartOf_ssim to use the config instead?

@cjcolvar
Copy link
Member Author

I didn't make an issue yet. I could just push the change to this PR quickly.

@cjcolvar
Copy link
Member Author

I think I was hesitant before because I don't really like the configuration but this change at least makes it consistent and it can be cleaned up in the future.

Copy link
Contributor

@elrayle elrayle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update to use the config. We can re-evaluate the config as a whole, but I know it was put in place intentionally to address apps that needed to use a different predicate, because iPartOf was already in use for a different purpose.

@elrayle elrayle merged commit d4ba654 into main Mar 22, 2022
@elrayle elrayle deleted the admin_set_count branch March 22, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hyrax::AdministrativeSet shows 0 Total Items and No entries found under Works in This Set when it has works
2 participants