On 11/23/22 12:12, Aravind Reddy Jangam wrote:
Can you please point me to documentation of setting up solr 9 cloud with 4
shards and 2 replicas in each shard
Here is how I download a config from zookeeper and then upload it again
on my tiny install with exactly one core:
/opt/solr/bin/solr zk downconfig -d collection1-config -n collection1 -z
localhost:9983
( make edits as required )
/opt/solr/bin/solr zk upconfig -d collection1-config -n collection1 -z
localhost:9983
The collection1-config directory here has a conf subdirectory that
contains the config files.
---
This command can then be used to create a collection using that config:
/opt/solr/bin/solr create_collection -c collection1 -n collection1
-shards 4 -replicationFactor 2 -z localhost:9983
You would replace "localhost:9983" with your actual zkhost string.
Alternately you can upload the config and create the collection all in
one step by replacing "-n collection1" with "-d
path/to/collection1-config" in the command above where the directory
referenced contains a conf subdirectory.
---
I went searching in the docs for examples of the "bin/solr
create_collection" command I have shown here, and the only one I can
find is in the "Solr in Docker" section of the docs, and that is
different enough from a non-docker install that it might not be helpful
to you:
https://solr.apache.org/guide/solr/latest/deployment-guide/docker-faq.html
Because "bin/solr zk" operates entirely in zookeeper and "bin/solr
create_collection" asks Solr via http to create all the files on disk,
the commands I have shown here can be run by any user.
In standalone mode, "bin/solr create_core" must be run as the same user
that is running Solr ... in that case the script creates directories and
files that Solr will then use, so they need proper permissions.
Thanks,
Shawn