Module: ElasticGraph::SchemaDefinition::Indexing::UpdateTargetResolver::RolloverTimestampSourceAdapter

Defined in:
lib/elastic_graph/schema_definition/indexing/update_target_resolver.rb

Overview

Adapter for the ‘rollover_timestamp_value_source` case for use by `resolve_field_source`.

Class Method Summary collapse

Class Method Details

.cannot_update_reason(object_type, relationship_name) ⇒ Object



187
188
189
190
# File 'lib/elastic_graph/schema_definition/indexing/update_target_resolver.rb', line 187

def self.cannot_update_reason(object_type, relationship_name)
  "`#{object_type.name}` uses a rollover index but we don't know what `#{relationship_name}` timestamp field to use " \
  "to select an index for the `#{object_type.name}` update requests"
end

.get_field_source(relationship, index, &block) ⇒ Object



183
184
185
# File 'lib/elastic_graph/schema_definition/indexing/update_target_resolver.rb', line 183

def self.get_field_source(relationship, index, &block)
  relationship.rollover_timestamp_value_source_for_index(index, &block)
end