Question

I am trying to update the schema.xml file in our production enviroment. I am using SolrCloud, and to distribute our schema.xml file we are using zkCli command line utility. The following commands are used to upload the new schema.xml:

./cloud-scripts/zkcli.sh zkcli.sh -cmd upconfig -zkhost  127.0.0.1:2181  -collection collection1 -confname myconf -solrhome ../solr -confdir ../solr/collection1/conf

./cloud-scripts/zkcli.sh zkcli.sh -cmd linkconfig -zkhost  127.0.0.1:2181  -collection collection1 -confname myconf -solrhome ../solr -confdir ../solr/collection1/conf

I noticed in the Solr admin GUI that the new schema.xml is present, so it is uploaded. But when I tested my updated fields on the change in the analyzer I noticed that the changes weren't processed. It was still using the old analyzer.

I've checked everything I could think of and the only possible cause I could imagine is that I need to reload the cores. I can't find any documentation suggesting this but it is the only cause I can think of. Can anyone confirm this?

Was it helpful?

Solution

You will need to execute only the first command to update schema.xml. This command will modify the schema.xml in Zookeeper but live Solr instances will not see this change. You have to restart the cores.

There is now a new Schema REST API to make changes to schema without using the upload command. And modifications are visible immediately.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top