Zookeeper multiple collection different schema

懵懂的女人 提交于 2019-12-12 20:17:42

问题


I have a zookeeper instance (Solr integrated version) with 3 collections. Each collection has a different schema.xml in it's conf directory. Zookeeper starts sucessfully - the goal is to do a distributed search across the different collections. My problem is that when I look at the schema of collection2 and collection3 via the admin tool they both appear to be using collection1 schema. So I cannot update collections 2 & 3 as they are missing their correct fields.

I have tried each of the following startup methods to no avail -

java -Dbootstrap_conf=true -DzkRun -DnumShards=1 -jar start.jar

and

java -DzkRun -DnumShards=1 -jar start.jar

and

java -Dbootstrap_confdir=solr/collection1/conf -Dcollection.configName=collection1 -DzkRun -DnumShards=1 -jar start.jar

Incase it helps my solr.xml file contains the following snippet -

<cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}" zkClientTimeout="${zkClientTimeout:15000}">
<core name="collection1" instanceDir="collection1" />
<core name="collection2" instanceDir="collection2" />
<core name="collection3" instanceDir="collection3" />


回答1:


Ooops I just found the answer to my problem.

java -Dbootstrap_conf=true -DzkRun -DnumShards=1 -jar start.jar

Basically the above command did not appear to work because zookeeper had already been bootstrapped (config files loaded) at a previous time using the following command

java -Dbootstrap_confdir=solr/collection1/conf -Dcollection.configName=collection1 -DzkRun -DnumShards=1 -jar start.jar

The command above means all collections will use the schema in collection1/conf. Subsequently starting zookeeper with the command -Dbootstrap_conf=true had no affect.

Solution - Remove solr/zoo_data directory and rerun the -Dbootstrap_conf=true command.



来源:https://stackoverflow.com/questions/23338324/zookeeper-multiple-collection-different-schema

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!