Skip to content

Commit

Permalink
Merge pull request #6927 from samvera/location-indexing
Browse files Browse the repository at this point in the history
Fix location indexing
  • Loading branch information
randalldfloyd authored Oct 17, 2024
2 parents ce352d3 + a8db0ad commit bead759
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 bead759

Please sign in to comment.