Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace solrizer reference so that feature works with hyrax 3+ #700

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/parsers/bulkrax/csv_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def set_ids_for_exporting_from_importer
instance_variable_set(instance_var, ActiveFedora::SolrService.post(
extra_filters.to_s,
fq: [
%(#{::Solrizer.solr_name(work_identifier)}:("#{complete_entry_identifiers.join('" OR "')}")),
%(#{solr_name(work_identifier)}:("#{complete_entry_identifiers.join('" OR "')}")),
"has_model_ssim:(#{models_to_search.join(' OR ')})"
],
fl: 'id',
Expand All @@ -243,6 +243,10 @@ def set_ids_for_exporting_from_importer
end
end

def solr_name(base_name)
Module.const_defined?(:Solrizer) ? ::Solrizer.solr_name(base_name) : ::ActiveFedora.index_field_mapper.solr_name(base_name)
end

def create_new_entries
current_record_ids.each_with_index do |id, index|
break if limit_reached?(limit, index)
Expand Down