使用 zookeeper 在 Solr4.x 中创建多个模式的步骤是什么
What are the steps to create multiple schema in Solr4.x with zookeeper
我有这样的要求:-
我必须创建多个模式并对它们执行连接。现在我想在 Solr Cloud 上用 zookeeper 做这个,这里的问题是我已经将 conf 目录上传到 zookeeper 并且我需要有多个集合,但我不知道如何为此更改 schema.xml。
敬请指导
您可以将多个配置上传到zookeeper,并以不同的方式命名。
然后在创建您的集合时指定适当的配置名称
例如
java -classpath .:/solr-test/deployment/solr-war/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost localhost:2181,localhost:2181,localhost:2181 -confdir /home/mdhussain/Data/sabahcdm/solr-test/deployment/solr-war/config1 -confname solrConfig1
java -classpath .:/solr-test/deployment/solr-war/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost localhost:2181,localhost:2181,localhost:2181 -confdir /home/mdhussain/Data/sabahcdm/solr-test/deployment/solr-war/config2-confname solrConfig2
卷曲http://127.0.0.1:6080/solr/admin/collections?action=CREATE&name=collection1&numShards=1&replicationFactor=1&collection.configName=solrConfig1
卷曲http://127.0.0.1:6080/solr/admin/collections?action=CREATE&name=collection2&numShards=1&replicationFactor=1&collection.configName=solrConfig2
谢谢
-侯赛因
我有这样的要求:- 我必须创建多个模式并对它们执行连接。现在我想在 Solr Cloud 上用 zookeeper 做这个,这里的问题是我已经将 conf 目录上传到 zookeeper 并且我需要有多个集合,但我不知道如何为此更改 schema.xml。
敬请指导
您可以将多个配置上传到zookeeper,并以不同的方式命名。 然后在创建您的集合时指定适当的配置名称
例如 java -classpath .:/solr-test/deployment/solr-war/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost localhost:2181,localhost:2181,localhost:2181 -confdir /home/mdhussain/Data/sabahcdm/solr-test/deployment/solr-war/config1 -confname solrConfig1
java -classpath .:/solr-test/deployment/solr-war/lib/* org.apache.solr.cloud.ZkCLI -cmd upconfig -zkhost localhost:2181,localhost:2181,localhost:2181 -confdir /home/mdhussain/Data/sabahcdm/solr-test/deployment/solr-war/config2-confname solrConfig2
卷曲http://127.0.0.1:6080/solr/admin/collections?action=CREATE&name=collection1&numShards=1&replicationFactor=1&collection.configName=solrConfig1
卷曲http://127.0.0.1:6080/solr/admin/collections?action=CREATE&name=collection2&numShards=1&replicationFactor=1&collection.configName=solrConfig2
谢谢 -侯赛因