Sha256: b0d64d36d28aabcab51e0ba2f299fb11f9951b14446d0cf9840a7196e2136165
Contents?: true
Size: 754 Bytes
Versions: 87
Compression:
Stored size: 754 Bytes
Contents
module ActiveFedora ## # An extension strategy to also apply solr indexes for each property. # @note If how a field is indexed changes based on property, this would be a # good place to define that. class SchemaIndexingStrategy # @param [#index] indexer The indexer to use def initialize(indexer = Indexers::NullIndexer.instance) @indexer = indexer end # @param [ActiveFedora::Base] object The object to apply the property to. # @param [ActiveTriples::Property, #name, #to_h] property The property to define. def apply(object, property) object.property property.name, property.to_h do |index| indexer.new(property).index(index) end end private attr_reader :indexer end end
Version data entries
87 entries across 87 versions & 1 rubygems