You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Index different contributor types (relators, eg. editor, advisor) into contributor
# Index the contributor type itself
def solr_doc_for_contributors(solr_doc)
if respond_to? :contributors_to_index
contributors_to_index.each do |v|
labels = object.send(v).to_a
# If there is anything in the solr_doc, add to it
if solr_doc["contributor_combined_tesim"]
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_combined", :stored_searchable)].push(*labels).uniq!
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_combined", :facetable)].push(*labels).uniq!
else
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_combined", :stored_searchable)] = labels
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_combined", :facetable)] = labels
end
# @todo I don't think the logic is quite right here as there will only ever be one result
labels.each do |_label|
if solr_doc['contributor_type_sim']
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_type", :facetable)] << v
else
solr_doc[ActiveFedora.index_field_mapper.solr_name("contributor_type", :facetable)] = [v]
end
end
end
end
end
The text was updated successfully, but these errors were encountered:
Current method in DogBiscuits::IndexesCommon:
The text was updated successfully, but these errors were encountered: