class ActiveFedora::SchemaIndexingStrategy
good place to define that.
@note If how a field is indexed changes based on property, this would be a
An extension strategy to also apply solr indexes for each property.
#
def apply(object, property)
-
property
(ActiveTriples::Property, #name, #to_h
) -- The property to define. -
object
(ActiveFedora::Base
) -- The object to apply the property to.
def apply(object, property) object.property property.name, property.to_h do |index| indexer.new(property).index(index) end end
def initialize(indexer = Indexers::NullIndexer.instance)
-
indexer
(#index
) -- The indexer to use
def initialize(indexer = Indexers::NullIndexer.instance) @indexer = indexer end