Skip to content

Commit

Permalink
🐛 Another fix to the solr connection (#2180)
Browse files Browse the repository at this point in the history
* Fix solr endpoint default issue

#2177

* Fix spec

* Override default connection

Ideally we probably need to define our own valkyrie indexing adapter, but
this should work as a temporary fix.
  • Loading branch information
laritakr authored Apr 8, 2024
1 parent 54fccb0 commit 3213f78
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions lib/valkyrie/indexing/solr/indexing_adapter_decorator.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

# Override Hyrax v5.0 to avoid incorrect default connection
# TODO: create and initialize a Hyku version of the indexing adapter
module Valkyrie
module Indexing
module Solr
module IndexingAdapterDecorator
def default_connection
::SolrEndpoint.new.connection
end
end
end
end
end

Valkyrie::Indexing::Solr::IndexingAdapter.prepend(Valkyrie::Indexing::Solr::IndexingAdapterDecorator)

0 comments on commit 3213f78

Please sign in to comment.