user3322698
user3322698

Reputation: 265

How do I change schema.xml without restarting Solr?

I've added "copyField source="product" dest="text"/" in schema.xml

solrconfig.xml

<requestHandler name="/select" class="solr.SearchHandler">
  <!-- default values for query parameters can be specified, these
       will be overridden by parameters in the request
  -->
  <lst name="defaults">
    <str name="echoParams">explicit</str>
    <int name="rows">10</int>
    <str name="df">text</str>
  </lst>
</requestHandler>

I restarted solr and loaded the data again to reflect changes made. My question is whether it is necessary to restart solr every time I make a change in schema.xml.

Upvotes: 12

Views: 17837

Answers (1)

John Petrone
John Petrone

Reputation: 27515

You can issue a RELOAD command to the core -

http://localhost:8983/solr/admin/cores?action=RELOAD&core=core0

That would let you avoid restarting tomcat or jetty and avoid most of the downtime as it will keep the old core running until the new core is ready.

However there are a few things configuration wise that would require a restart. See https://issues.apache.org/jira/browse/SOLR-3592 and https://wiki.apache.org/solr/CoreAdmin#RELOAD

Upvotes: 15

Related Questions