class SolrMakr::Commands::CreateCollection
Public Instance Methods
execute()
click to toggle source
# File lib/solr_makr/commands/create_collection.rb, line 14 def execute configset_directory = fetch_configset(configset) unless remote_configset_exists? buffer.print ". Zookeeper configuration `#{config_name}` does not exist... creating" compose_buffer SolrMakr::Configsets::PushToZookeeper, name: remote_configset_name, directory: configset_directory end expect_success! solr_client.create(params_for_create) buffer.ok "Created collection: #{name}" end
params_for_create()
click to toggle source
@api private @return [Hash]
# File lib/solr_makr/commands/create_collection.rb, line 30 def params_for_create { name: name, config_name: remote_configset_name, number_of_shards: number_of_shards, replication_factor: replication_factor, max_shards_per_node: max_shards_per_node } end