Module: Arclight::SolrEadIndexerExt

Included in:
Indexer
Defined in:
lib/arclight/solr_ead_indexer_ext.rb

Overview

An module to extend SolrEad::Indexer behaviors to allow us to add or override behaviors that require knowledge of the entire XML document.

Instance Method Summary collapse

Instance Method Details

#additional_component_fields(node, addl_fields = {}) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/arclight/solr_ead_indexer_ext.rb', line 8

def additional_component_fields(node, addl_fields = {})
  solr_doc = super

  add_count_of_child_compontents(node, solr_doc)
  add_ancestral_titles(node, solr_doc)
  add_ancestral_ids(node, solr_doc)

  add_collection_creator_to_component(node, solr_doc)

  add_self_or_parents_restrictions(node, solr_doc)

  add_self_or_parents_terms(node, solr_doc)

  solr_doc
end

#delete_allObject



24
25
26
27
# File 'lib/arclight/solr_ead_indexer_ext.rb', line 24

def delete_all
  solr.delete_by_query('*:*')
  solr.commit
end