Class: Solr::Request::Cloud::FirstShardLeaderNodeSelectionStrategy
- Inherits:
-
NodeSelectionStrategy
- Object
- NodeSelectionStrategy
- Solr::Request::Cloud::FirstShardLeaderNodeSelectionStrategy
- Defined in:
- lib/solr/request/cloud/first_shard_leader_node_selection_strategy.rb
Instance Attribute Summary
Attributes inherited from NodeSelectionStrategy
Instance Method Summary collapse
Methods inherited from NodeSelectionStrategy
Constructor Details
This class inherits a constructor from Solr::Request::NodeSelectionStrategy
Instance Method Details
#call ⇒ Object
5 6 7 8 9 10 |
# File 'lib/solr/request/cloud/first_shard_leader_node_selection_strategy.rb', line 5 def call leader = first_shard_leader_replica_node_for(collection: collection_name) replicas = solr_cloud_active_nodes_urls.shuffle urls = ([leader] + replicas).flatten.uniq map_urls_to_collections(urls) end |