diff --git a/lib/valkyrie/persistence/solr/metadata_adapter.rb b/lib/valkyrie/persistence/solr/metadata_adapter.rb index c17631b3..5c44f783 100644 --- a/lib/valkyrie/persistence/solr/metadata_adapter.rb +++ b/lib/valkyrie/persistence/solr/metadata_adapter.rb @@ -39,7 +39,7 @@ def initialize(connection:, resource_indexer: NullIndexer, write_only: false) # @return [Valkyrie::Persistence::Solr::Persister] The solr persister. def persister - Valkyrie::Persistence::Solr::Persister.new(adapter: self) + @persister ||= Valkyrie::Persistence::Solr::Persister.new(adapter: self) end def write_only?