Skip to content

Commit

Permalink
Extract hyku solr connection (#6666)
Browse files Browse the repository at this point in the history
* make connection have a writer

* Add #reset! for Hyku support

* Appeasing rubocop connection config

---------

Co-authored-by: Kirk Wang <[email protected]>
  • Loading branch information
jeremyf and kirkkwang authored Feb 2, 2024
1 parent 976a45c commit ea706b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/valkyrie/indexing/solr/indexing_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class IndexingAdapter
##
# @!attribute [r] connection
# @return [RSolr::Client]
attr_reader :connection
attr_accessor :connection

##
# @param connection [RSolr::Client] The RSolr connection to index to.
Expand Down Expand Up @@ -37,6 +37,10 @@ def wipe!
connection.commit
end

def reset!
self.connection = default_connection
end

private

def persist(resources)
Expand Down

0 comments on commit ea706b4

Please sign in to comment.