lib/ddr/index/fields.rb in ddr-models-2.3.2 vs lib/ddr/index/fields.rb in ddr-models-2.4.0.rc1
- old
+ new
@@ -1,9 +1,18 @@
module Ddr::Index
module Fields
+ extend Deprecation
- include LegacyLicenseFields
+ def self.const_missing(name)
+ if const = LegacyLicenseFields.const_get(name)
+ Deprecation.warn(Ddr::Index::Fields,
+ "The constant `#{name}` is deprecated and will be removed in ddr-models 3.0.")
+ const
+ else
+ super
+ end
+ end
def self.get(name)
const_get(name.to_s.upcase, false)
end
@@ -18,9 +27,10 @@
ACCESS_ROLE = Field.new :access_role, :stored_sortable
ACTIVE_FEDORA_MODEL = Field.new :active_fedora_model, :stored_sortable
ADMIN_SET = Field.new :admin_set, :stored_sortable
ADMIN_SET_FACET = Field.new :admin_set_facet, :facetable
+ ASPACE_ID = Field.new :aspace_id, :stored_sortable
BOX_NUMBER_FACET = Field.new :box_number_facet, :facetable
COLLECTION_FACET = Field.new :collection_facet, :facetable
COLLECTION_URI = Field.new :collection_uri, :symbol
CONTENT_CONTROL_GROUP = Field.new :content_control_group, :searchable, type: :string
CONTENT_SIZE = Field.new :content_size, solr_name: "content_size_lsi"