Skip to content

Commit

Permalink
🐛 Update catalog search to fix discrepancies
Browse files Browse the repository at this point in the history
This commit will update the deprecated link_to_search to link_to_facet
which will enable the faceted properties on each search hit to be a
link.

Ref:
- #759
  • Loading branch information
kirkkwang committed Sep 23, 2024
1 parent 063cde0 commit 86a57da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
28 changes: 14 additions & 14 deletions lib/dog_biscuits/property_mappings/property_mappings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module PropertyMappings
# label: a human-readable label for the property REQUIRED
# index: any additional options for the blacklight index in an array
# excluding helper_method and item prop
# provide in a hash, eg. [{ if: false }], or [{ link_to_search: true }]
# nb. for link_to_search, just provide true
# provide in a hash, eg. [{ if: false }], or [{ link_to_facet: true }]
# nb. for link_to_facet, just provide true
# schema_org: hash containing property; can also include type and value
# help_text: help text to include in the form
# render_as: a custom renderer for the field (omit facetable)
Expand All @@ -26,7 +26,7 @@ def property_mappings
{
file_format: {
label: 'File format',
index: [{ link_to_search: true }]
index: [{ link_to_facet: true }]
},
embargo_release_date: {
label: 'Embargo releases on',
Expand Down Expand Up @@ -84,11 +84,11 @@ def property_mappings
label: 'Altitude'
},
awarding_institution: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
label: 'Awarding institution'
},
based_near: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "contentLocation",
type: "http://schema.org/Place",
Expand All @@ -98,7 +98,7 @@ def property_mappings
help_text: "A place name related to the work, such as its site of publication, or the city, state, or country the work contents are about. Calls upon the <a href='http://www.geonames.org'>GeoNames web service</a>."
},
based_near_label: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "contentLocation",
type: "http://schema.org/Place",
Expand All @@ -111,7 +111,7 @@ def property_mappings
help_text: "The version of the file, eg. Author's Original or Accepted Manuscript."
},
contributor: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "contributor",
type: "http://schema.org/Person",
Expand All @@ -121,7 +121,7 @@ def property_mappings
help_text: "A person or group you want to recognize for playing a role in the creation of the work, but not the primary role."
},
contributor_combined: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "contributor",
type: "http://schema.org/Person",
Expand All @@ -133,7 +133,7 @@ def property_mappings
label: 'Contributor type'
},
creator: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
label: 'Creator',
schema_org: {
property: "creator",
Expand Down Expand Up @@ -297,15 +297,15 @@ def property_mappings
label: 'Journal name'
},
keyword: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
label: 'Keywords',
schema_org: {
property: "keywords"
},
help_text: "Words or phrases you select to describe what the work is about. These are used to search for content."
},
language: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
label: 'Language',
schema_org: {
property: "language"
Expand Down Expand Up @@ -417,7 +417,7 @@ def property_mappings
helper_method: 'publication_status'
},
publisher: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "publisher",
type: "http://schema.org/Organization",
Expand All @@ -444,7 +444,7 @@ def property_mappings
label: 'Related URL'
},
resource_type: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
'Article' => "http://schema.org/Article",
'Audio' => "http://schema.org/AudioObject",
Expand Down Expand Up @@ -501,7 +501,7 @@ def property_mappings
label: 'Source'
},
subject: {
index: [{ link_to_search: true }],
index: [{ link_to_facet: true }],
schema_org: {
property: "about",
type: "http://schema.org/Thing",
Expand Down

0 comments on commit 86a57da

Please sign in to comment.