Skip to content

Commit

Permalink
Fix location faceting
Browse files Browse the repository at this point in the history
Location indexer now includes the term used for location faceting.
  • Loading branch information
laritakr committed Oct 17, 2024
1 parent ce352d3 commit a8db0ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/indexers/concerns/hyrax/location_indexer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ module Hyrax
module LocationIndexer
def to_solr
super.tap do |index_document|
index_document[:based_near_label_tesim] = based_near_label_lookup(resource.based_near) if resource.respond_to? :based_near
index_document[:based_near_label_tesim] = index_document[:based_near_label_tesim] = based_near_label_lookup(resource.based_near) if resource.respond_to? :based_near
end
end

private

def based_near_label_lookup(locations)
locations.map do |loc|
location_service.full_label(loc)
location_service.full_label(loc) if loc.present?
end
end

Expand Down

0 comments on commit a8db0ad

Please sign in to comment.