lib/ddr/models/indexing.rb in ddr-models-1.14.2 vs lib/ddr/models/indexing.rb in ddr-models-1.15.0
- old
+ new
@@ -9,21 +9,19 @@
solr_doc.merge index_fields
end
def index_fields
fields = {
- TITLE => title_display,
- INTERNAL_URI => internal_uri,
- IDENTIFIER => identifier_sort,
- WORKFLOW_STATE => workflow_state
+ TITLE => title_display,
+ INTERNAL_URI => internal_uri,
+ IDENTIFIER => identifier_sort,
+ WORKFLOW_STATE => workflow_state,
+ LOCAL_ID => local_id,
+ ADMIN_SET => admin_set,
+ PERMANENT_ID => permanent_id,
+ PERMANENT_URL => permanent_url,
}
- if permanent_id.present?
- fields[PERMANENT_ID] = permanent_id
- end
- if permanent_url.present?
- fields[PERMANENT_URL] = permanent_url
- end
if respond_to? :fixity_checks
last_fixity_check = fixity_checks.last
fields.merge!(last_fixity_check.to_solr) if last_fixity_check
end
if respond_to? :virus_checks
@@ -57,12 +55,9 @@
fields[DEFAULT_LICENSE_TITLE] = default_license_title
fields[DEFAULT_LICENSE_URL] = default_license_url
end
if respond_to? :roles
fields.merge!(roles.index_fields)
- end
- if local_id.present?
- fields[LOCAL_ID] = local_id
end
fields
end
def title_display