lib/ddr/models/indexing.rb in ddr-models-3.0.0.beta.3 vs lib/ddr/models/indexing.rb in ddr-models-3.0.0.beta.4

- old
+ new

@@ -2,21 +2,27 @@ module Models module Indexing include Ddr::Index::Fields + def self.const_missing(name) + Ddr::Index::Fields.const_missing(name) + end + def to_solr(solr_doc=Hash.new, opts={}) solr_doc = super(solr_doc, opts) solr_doc.merge index_fields end def index_fields fields = { ACCESS_ROLE => roles.to_json, ADMIN_SET => admin_set, + ASPACE_ID => aspace_id, ATTACHED_FILES => attached_files_profile.to_json, BOX_NUMBER_FACET => desc_metadata_values('box_number'), + CONTRIBUTOR_FACET => desc_metadata_values('contributor'), CREATOR_FACET => descMetadata.creator, DATE_FACET => descMetadata.date, DATE_SORT => date_sort, DEPOSITOR => depositor, DISPLAY_FORMAT => display_format, @@ -32,9 +38,10 @@ PUBLISHER_FACET => descMetadata.publisher, RESEARCH_HELP_CONTACT => research_help_contact, RESOURCE_ROLE => roles.in_resource_scope.agents, SERIES_FACET => desc_metadata_values('series'), SPATIAL_FACET => desc_metadata_values('spatial'), + SUBJECT_FACET => desc_metadata_values('subject'), TITLE => title_display, TYPE_FACET => descMetadata.type, WORKFLOW_STATE => workflow_state, YEAR_FACET => year_facet, }