Skip to content

Commit

Permalink
Remove all code related to nested indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar committed Sep 28, 2022
1 parent f23358d commit 6772fe2
Show file tree
Hide file tree
Showing 22 changed files with 12 additions and 858 deletions.
1 change: 0 additions & 1 deletion app/actors/hyrax/actors/collections_membership_actor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def assign_nested_attributes_for_collection(env)
# along side the FileSets on the show page
def add(env, id)
collection = Hyrax.config.collection_class.find(id)
collection.reindex_extent = Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX

return unless env.current_ability.can?(:deposit, collection)
env.curation_concern.member_of_collections << collection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def update_members # rubocop:disable Metrics/MethodLength
after_update_error(err_msg) if err_msg.present?
return if err_msg.present?

@collection.try(:reindex_extent=, Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX)
begin
Hyrax::Collections::CollectionMemberService.add_members_by_ids(collection_id: collection_id,
new_member_ids: batch_ids,
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/hyrax/dashboard/collections_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,6 @@ def update_active_fedora_collection
process_branding

@collection.visibility = Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE unless Hyrax::CollectionType.for(collection: @collection).discoverable?
# we don't have to reindex the full graph when updating collection
@collection.reindex_extent = Hyrax::Adapters::NestingIndexAdapter::LIMITED_REINDEX
if @collection.update(collection_params.except(:members))
after_update_response
else
Expand Down
19 changes: 0 additions & 19 deletions app/indexers/hyrax/repository_reindexer.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/concerns/hyrax/collection_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module CollectionBehavior
include Hyrax::HumanReadableType
include Hyrax::HasRepresentative
include Hyrax::Permissions
include Hyrax::CollectionNesting

included do
validates_with HasOneTitleValidator
Expand Down
73 changes: 0 additions & 73 deletions app/models/concerns/hyrax/collection_nesting.rb

This file was deleted.

1 change: 0 additions & 1 deletion app/models/concerns/hyrax/work_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module WorkBehavior
include ProxyDeposit
include Works::Metadata
include WithEvents
include Hyrax::CollectionNesting

included do
property :owner, predicate: RDF::URI.new('http://opaquenamespace.org/ns/hydra/owner'), multiple: false
Expand Down
193 changes: 0 additions & 193 deletions app/services/hyrax/adapters/nesting_index_adapter.rb

This file was deleted.

16 changes: 0 additions & 16 deletions config/initializers/nesting_indexer_initializer.rb

This file was deleted.

5 changes: 3 additions & 2 deletions lib/hyrax/configuration.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# frozen_string_literal: true
require 'hyrax/role_registry'
require 'samvera/nesting_indexer'

module Hyrax
##
Expand Down Expand Up @@ -845,8 +844,10 @@ def uploader

attr_accessor :nested_relationship_reindexer

# Deprecated
# Now a no-op
def default_nested_relationship_reindexer
->(id:, extent:) { Samvera::NestingIndexer.reindex_relationships(id: id, extent: extent) }
->(id:, extent:) {}
end

attr_writer :solr_select_path
Expand Down
2 changes: 1 addition & 1 deletion spec/actors/hyrax/actors/lease_actor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
let(:leased_work) { create(:leased_work, with_lease_attributes: lease_attributes) }
let(:subject) { described_class.new(leased_work) }

it 'destroys and reindexes the new permission appropriately in solr', with_nested_reindexing: true do
it 'destroys and reindexes the new permission appropriately in solr' do
allow(leased_work.lease).to receive(:active?).and_return false
subject.destroy
expect(::SolrDocument.find(leased_work.id)[:visibility_ssi]).to eq(authenticated_vis)
Expand Down
Loading

0 comments on commit 6772fe2

Please sign in to comment.