class Solr::Request::Cloud::LeaderNodeSelectionStrategy
Public Instance Methods
call()
click to toggle source
# File lib/solr/request/cloud/leader_node_selection_strategy.rb, line 5 def call urls = [leader_replica_node_for(collection: collection_name)] map_urls_to_collections(urls) end
Private Instance Methods
leader_replica_node_for(collection:)
click to toggle source
# File lib/solr/request/cloud/leader_node_selection_strategy.rb, line 12 def leader_replica_node_for(collection:) shards = Solr.shards_for(collection: collection) return unless shards first_shard_name = shards.sort.first Solr.leader_replica_node_for(collection: collection, shard: first_shard_name) end