diff --git a/app/controllers/catalog_controller.rb b/app/controllers/catalog_controller.rb index 012181aa..7ede2239 100644 --- a/app/controllers/catalog_controller.rb +++ b/app/controllers/catalog_controller.rb @@ -43,6 +43,8 @@ def unique_custom_fields config.browse.document_actions = config.index.document_actions ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params + # Group records by manifest in order to display a single result for a given + # resource in 'search across' config.default_solr_params = { qt: 'search', rows: 10, diff --git a/app/models/adjusted_grouped_response.rb b/app/models/adjusted_grouped_response.rb index 2f415360..599df418 100644 --- a/app/models/adjusted_grouped_response.rb +++ b/app/models/adjusted_grouped_response.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +# After the grouping that happens during search, the facet counts are wrong. We +# adjust them to reflect actual counts for the result set. class AdjustedGroupedResponse < Blacklight::Solr::Response def initialize(*args) data = FacetCount.new(args.first) diff --git a/architecture-decisions/0005-resource-per-collection.md b/architecture-decisions/0005-resource-per-collection.md new file mode 100644 index 00000000..2f771b90 --- /dev/null +++ b/architecture-decisions/0005-resource-per-collection.md @@ -0,0 +1,35 @@ +# 5. Create a IIIFResource for each Collection that a resource is a member of + +Date: Archaeological + +## Status + +Accepted + +## Context + +We needed to be able to display a resource in more than one collection, because +in Figgy a resource can be a member of multiple collections. + +At the time of this decision, one IIIFResource could only be a member of one Exhibit. + +## Decision + +We create one IIIFResource per Collection of which it is a member. + +We map each IIIFResource to one SolrDocument. + +## Consequences + +* 'Search Across' requires a complicated grouping mechanism (in solr) in order + to keep a resource from appearing multiple times. + +* It's easy to delete a collection and all its resources. It's easy to delete a + resource if it's no longer in a given collection. + +* The resource that appears in 'Search Across' displays metadata as shown in the + exhibit it happened to pull the resource from. This may be be specialized to + the exhibit, and different from the canonical data as stored in figgy. + +* If spotlight introduces the ability to have one resource in multiple exhibits + we may have a different implementation than is in core (this happened).