Skip to content

Commit

Permalink
🐛 Ensure solr adapter on account switch
Browse files Browse the repository at this point in the history
This commit will ensure that the adapter is set to solr.  There seems to
be an error occuring when the worker is switching accounts where it
loses the adapter and raises an error.
  • Loading branch information
kirkkwang committed Feb 5, 2025
1 parent b0de624 commit a35f08e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/solr_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ def connection_options
#
# https://github.com/samvera/hyrax/blob/a5a0ae9e56df857a92fc53ae86216cbb007db47a/lib/valkyrie/indexing/solr/indexing_adapter.rb#L83-L101
base_options['core'] ||= switchable_options['collection']
# Ensure we have the solr adapter set
base_options['adapter'] ||= 'solr'

# NOTE: the switchable_options includes two keys: "collection" and "url"
# The "url" should be used to make the connection to Solr.
Expand Down

0 comments on commit a35f08e

Please sign in to comment.