Class: Dor::DataIndexer

Inherits:
Object
  • Object
show all
Includes:
ActiveFedora::Indexing
Defined in:
lib/dor/indexers/data_indexer.rb

Overview

Indexing provided by ActiveFedora

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(resource:) ⇒ DataIndexer

Returns a new instance of DataIndexer.



9
10
11
# File 'lib/dor/indexers/data_indexer.rb', line 9

def initialize(resource:)
  @resource = resource
end

Instance Attribute Details

#resourceObject (readonly)

Returns the value of attribute resource.



8
9
10
# File 'lib/dor/indexers/data_indexer.rb', line 8

def resource
  @resource
end

Instance Method Details

#to_solr(solr_doc = {}, opts = {}) ⇒ Object

we need to override this until github.com/samvera/active_fedora/pull/1371 has been released



15
16
17
18
19
# File 'lib/dor/indexers/data_indexer.rb', line 15

def to_solr(solr_doc = {}, opts = {})
  super.tap do |doc|
    doc['active_fedora_model_ssi'] = has_model
  end
end