Module: ElasticGraph::SchemaDefinition::Indexing::UpdateTargetResolver::RoutingSourceAdapter

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

Overview

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

Class Method Summary collapse

Class Method Details

.cannot_update_reason(object_type, relationship_name) ⇒ Object



173
174
175
176
# File 'lib/elastic_graph/schema_definition/indexing/update_target_resolver.rb', line 173

def self.cannot_update_reason(object_type, relationship_name)
  "`#{object_type.name}` uses custom shard routing but we don't know what `#{relationship_name}` field to use " \
  "to route the `#{object_type.name}` update requests"
end

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



169
170
171
# File 'lib/elastic_graph/schema_definition/indexing/update_target_resolver.rb', line 169

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