Module: ElasticGraph::Indexer::RecordPreparer::Identity

Defined in:
lib/elastic_graph/indexer/record_preparer.rb

Overview

An alternate ‘RecordPreparer` implementation that implements the identity function: it just echoes back the record it is given.

This is intended only for use where a ‘RecordPreparer` is required but the data is not ultimately going to be sent to the datastore. For example, when an event is invalid, we still build operations for it, and the operations require a `RecordPreparer`, but we do not send them to the datastore.

Class Method Summary collapse

Class Method Details

.prepare_for_index(type_name, record) ⇒ Object



79
80
81
# File 'lib/elastic_graph/indexer/record_preparer.rb', line 79

def self.prepare_for_index(type_name, record)
  record
end