Class: Hyrax::DeepIndexingService
- Inherits:
-
BasicMetadataIndexer
- Object
- ActiveFedora::RDF::IndexingService
- BasicMetadataIndexer
- Hyrax::DeepIndexingService
- Defined in:
- app/indexers/hyrax/deep_indexing_service.rb
Instance Method Summary collapse
- #add_assertions ⇒ Object
-
#append_to_solr_doc(solr_doc, solr_field_key, field_info, val) ⇒ Object
We’re overiding the default indexer in order to index the RDF labels.
Instance Method Details
#add_assertions ⇒ Object
22 23 24 25 |
# File 'app/indexers/hyrax/deep_indexing_service.rb', line 22 def add_assertions(*) fetch_external super end |
#append_to_solr_doc(solr_doc, solr_field_key, field_info, val) ⇒ Object
We’re overiding the default indexer in order to index the RDF labels. In order for this to be called, you must specify at least one default indexer on the property.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/indexers/hyrax/deep_indexing_service.rb', line 10 def append_to_solr_doc(solr_doc, solr_field_key, field_info, val) return super unless object.controlled_properties.include?(solr_field_key.to_sym) case val when ActiveTriples::Resource append_label_and_uri(solr_doc, solr_field_key, field_info, val) when String append_label(solr_doc, solr_field_key, field_info, val) else raise ArgumentError, "Can't handle #{val.class}" end end |