Class: Spotlight::UploadSolrDocumentBuilder

Inherits:
SolrDocumentBuilder show all
Defined in:
app/services/spotlight/upload_solr_document_builder.rb

Overview

Creates solr documents for the uploaded documents in a resource

Instance Attribute Summary

Attributes inherited from SolrDocumentBuilder

#resource

Instance Method Summary collapse

Methods inherited from SolrDocumentBuilder

#documents_to_index, #initialize

Constructor Details

This class inherits a constructor from Spotlight::SolrDocumentBuilder

Instance Method Details

#to_solrObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/services/spotlight/upload_solr_document_builder.rb', line 6

def to_solr
  resource.store_url! # so that #url doesn't return the tmp directory

  solr_hash = super

  add_default_solr_fields solr_hash

  add_image_dimensions solr_hash

  add_file_versions solr_hash

  add_sidecar_fields solr_hash

  solr_hash
end