From a35f08e8c2eaa9f74b073277e4ae857010713a3f Mon Sep 17 00:00:00 2001 From: Kirk Wang Date: Tue, 4 Feb 2025 17:11:40 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Ensure=20solr=20adapter=20on=20a?= =?UTF-8?q?ccount=20switch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- app/models/solr_endpoint.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/solr_endpoint.rb b/app/models/solr_endpoint.rb index 723e1330d1..f64551e603 100644 --- a/app/models/solr_endpoint.rb +++ b/app/models/solr_endpoint.rb @@ -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.