Class: Spotlight::Resources::JsonUpload

Inherits:
Spotlight::Resource show all
Defined in:
app/models/spotlight/resources/json_upload.rb

Overview

Raw solr document uploads

Class Method Summary collapse

Methods inherited from Spotlight::Resource

#document_model, #reindex_later, #save_and_index

Class Method Details

.indexing_pipelineObject

The indexing pipeline for JSON uploads copies the data from the stored ‘#data` field directly into the indexed document.



11
12
13
14
15
16
17
18
19
# File 'app/models/spotlight/resources/json_upload.rb', line 11

def self.indexing_pipeline
  @indexing_pipeline ||= super.dup.tap do |pipeline|
    pipeline.sources = [Spotlight::Etl::Sources::StoredData]

    pipeline.transforms = [
      Spotlight::Etl::Transforms::IdentityTransform
    ] + pipeline.transforms
  end
end