Basically uploading a "Solr config" (including schema.xml,
solrconfig.xml etc.) is an operation different from creating
collections. When creating a collection (e.g. using the Collection API)
you reference the (already existing) "Solr config" it needs to use.
Collections can share "Solr config"s. I know of at least two ways to
load a "Solr config" into ZK using Solr-tools.
1) You can use ZkCLI tool (of course ZK needs to be started) - something
like this
mkdir -p "${SOLR_INSTALL}/example/webapps/temp"
cp "${SOLR_INSTALL}/example/webapps/solr.war"
"${SOLR_INSTALL}/example/webapps/temp"
cd "${SOLR_INSTALL}/example/webapps/temp"
jar -xf "solr.war"
java -classpath "${SOLR_INSTALL}/example/webapps/temp/WEB-INF/lib/*"
org.apache.solr.cloud.ZkCLI -cmd upconfig -confdir
<path_to_solr_config_dir> -confname <logical_solr_config_name> --zkhost
<zk_connection_str>
rm -rf "${SOLR_INSTALL}/example/webapps/temp"
Believe there is also a zkcli.sh tool
2) or You can have an Solr node (server) load a "Solr config" into ZK
during startup by adding collection.configName and bootstrap_confdir VM
params - something like this
java -DzkHost=<zk_connection_str> -Dcollection.configName=edr_sms_conf
-Dbootstrap_confdir=<path_to_solr_config_dir> -jar start.jar
I prefer 1) for several reasons.
Regards, Per Steffensen
On 1/24/13 4:02 PM, Fadi Mohsen wrote:
Hi, We would like to use Solr to index statistics from any Java module in
our production environment.
Applications have to can create collections and index data on demand, so my
initial thought is to use different HTTP methods to accomplish a collection
in cluster and then right away start HTTP POST documents, but the issue
here is the schema.xml.
Is it possible to HTTP POST the schema via Solr to Zookeeper?
Or do I have to know about other service host/IP than SOLR, such as
ZooKeeper (wanted to understand whether there is a way to avoid knowing
about zookeeper in production.)?
This must be a duplicate of another question, excuse me in advance.
Regards
Fadi