diff --git a/lib/arclight/traject/ead2_component_config.rb b/lib/arclight/traject/ead2_component_config.rb index 2edbccec9..55c779da5 100644 --- a/lib/arclight/traject/ead2_component_config.rb +++ b/lib/arclight/traject/ead2_component_config.rb @@ -68,7 +68,7 @@ # # NOTE: All fields should be stored in Solr # ================== -to_field 'ref_ssi' do |record, accumulator, _context| +to_field 'ref_ssi' do |record, accumulator, context| next if context.output_hash['ref_ssi'] accumulator << if record.attribute('id').blank? @@ -97,8 +97,7 @@ data = { ref_id: context.output_hash['ref_ssi']&.first, - root_id: settings[:root].output_hash['id']&.first, - repository: settings[:root].settings[:repository] + root_id: settings[:root].output_hash['id']&.first } accumulator << (settings[:component_identifier_format] % data) @@ -301,6 +300,7 @@ provide :counter, context.settings[:counter] provide :depth, context.settings[:depth].to_i + 1 provide :component_traject_config, context.settings[:component_traject_config] + provide :component_identifier_format, context.settings[:component_identifier_format] end i.load_config_file(context.settings[:component_traject_config]) diff --git a/lib/arclight/traject/ead2_config.rb b/lib/arclight/traject/ead2_config.rb index d94175f62..d7de0a005 100644 --- a/lib/arclight/traject/ead2_config.rb +++ b/lib/arclight/traject/ead2_config.rb @@ -56,7 +56,6 @@ provide 'repository', ENV.fetch('REPOSITORY_ID', nil) provide 'logger', Logger.new($stderr) provide 'component_traject_config', File.join(__dir__, 'ead2_component_config.rb') - # provide 'component_identifier_format', '%{root_id}%{ref_id}' end each_record do |_record, context| @@ -277,7 +276,6 @@ def increment provide :depth, 1 provide :logger, context.settings[:logger] provide :component_traject_config, context.settings[:component_traject_config] - provide :component_identifier_format, context.settings[:component_identifier_format] if context.settings[:component_identifier_format] end i.load_config_file(context.settings[:component_traject_config])