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

Search Only Tenant Should Ignore Collection Type #951

Open
Tracked by #903
jeremyf opened this issue Dec 15, 2023 · 0 comments
Open
Tracked by #903

Search Only Tenant Should Ignore Collection Type #951

jeremyf opened this issue Dec 15, 2023 · 0 comments
Labels
bug Something isn't working Contribute Back

Comments

@jeremyf
Copy link
Contributor

jeremyf commented Dec 15, 2023

Each work belongs to a collection type. That collection type is unique to a tenant.

When we’re in a search-only tenant (e.g. https://search.hykucommons.org), the collection types of the search tenant don’t line up with what is in each tenant. That is to say the search tenant has it’s own collection types; and when we’re using the cross site search we’re looking for the Work’s collection type relative to the search tenant.

The reason we're looking for a collection type is in part because we're interested in it's badge color; something that we may want to exclude on a search-only tenant.

This relates to:

jeremyf added a commit that referenced this issue Dec 15, 2023
*Background:* A search_only tenant renders SOLR documents that had home
tenants different than the search_only tenant.  Part of that rendering
includes the underlying Work's collection type.  The SOLR document
stores the `Hyrax::CollectionType`'s ID.

The search_only tenant might have the same ID for
`Hyrax::CollectionType` but it is not the same thing.  Further, the home
tenant might have an ID that is not in the search_only tenant, which
results in an `ActiveRecord::RecordNotFound` error.

Prior to this commit, we always attempted to render the badge.

With this commit, we add some guarding logic to avoid rendering the
badge when we're likely not rendering within the SOLR documents home
tenant.

Related to:

- #951
- samvera/hyku#1815
@jeremyf jeremyf added Contribute Back bug Something isn't working labels Dec 15, 2023
@jeremyf jeremyf self-assigned this Dec 15, 2023
jeremyf added a commit that referenced this issue Dec 15, 2023
*Background:* A search_only tenant renders SOLR documents that had home
tenants different than the search_only tenant.  Part of that rendering
includes the underlying Work's collection type.  The SOLR document
stores the `Hyrax::CollectionType`'s ID.

The search_only tenant might have the same ID for
`Hyrax::CollectionType` but it is not the same thing.  Further, the home
tenant might have an ID that is not in the search_only tenant, which
results in an `ActiveRecord::RecordNotFound` error.

Prior to this commit, we always attempted to render the badge.

With this commit, we add some guarding logic to avoid rendering the
badge when we're likely not rendering within the SOLR documents home
tenant.

Related to:

- #951
- samvera/hyku#1815
jeremyf added a commit that referenced this issue Dec 15, 2023
*Background:* A search_only tenant renders SOLR documents that had home
tenants different than the search_only tenant.  Part of that rendering
includes the underlying Work's collection type.  The SOLR document
stores the `Hyrax::CollectionType`'s ID.

The search_only tenant might have the same ID for
`Hyrax::CollectionType` but it is not the same thing.  Further, the home
tenant might have an ID that is not in the search_only tenant, which
results in an `ActiveRecord::RecordNotFound` error.

Prior to this commit, we always attempted to render the badge.

With this commit, we add some guarding logic to avoid rendering the
badge when we're likely not rendering within the SOLR documents home
tenant.

Related to:

- #951
- samvera/hyku#1815
jeremyf added a commit to samvera/hyku that referenced this issue Dec 19, 2023
@jeremyf jeremyf removed their assignment May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Contribute Back
Projects
Status: Client Verification
Development

No branches or pull requests

1 participant