1

I am using Solar 4.6 and changed something inside schema.xml. In order to update schema.xml inside my core I used zkcli. Which works fine and I am able to see the modified schema.xml inside the Solr Admin GUI under cloud\tree\config\foobar\schema.xml.

But after calling

  • http://localhost:8983/solr/admin/collections?action=RELOAD&name=foobar and
  • http://localhost:8983/solr/admin/cores?action=RELOAD&name=foobar,

the old schema.xml was still in the core named foobar.

SimplyInk
  • 5,832
  • 1
  • 18
  • 27
Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43

2 Answers2

0

You have to reload your cores after giving it a new schema.

Replace name with core in your query as:

/solr/admin/cores?action=RELOAD&**core**=yourcorename

For example

http://localhost:8983/solr/admin/cores?action=RELOAD&core=foobar
jwpfox
  • 5,124
  • 11
  • 45
  • 42
javacreed
  • 958
  • 1
  • 8
  • 20
0

Your 2nd HTTP request to the Core API is wrong. Change name to core:

http://localhost:8983/solr/admin/cores?action=RELOAD&name=foobar should be http://localhost:8983/solr/admin/cores?action=RELOAD&core=foobar.


http://archive.apache.org/dist/lucene/solr/ref-guide/apache-solr-ref-guide-4.6.pdf (page 277)

RELOAD

The RELOAD action loads a new core from the configuration of an existing, registered Solr core. While the new core is initializing, the existing one will continue to handle requests. When the new Solr core is ready, it takes over and the old core is unloaded.

This is useful when you've made changes to a Solr core's configuration on disk, such as adding new field definitions. Calling the RELOAD action lets you apply the new configuration without having to restart the Web container. However the Core Container does not persist the SolrCloud solr.xml parameters, such as solr/@zkHost and solr/cores/@hostPort, which are ignored.

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

The RELOAD action accepts a single parameter, core, which is the name of the core to be reloaded.


see also https://cwiki.apache.org/confluence/display/solr/CoreAdmin+API#CoreAdminAPI-RELOAD

Community
  • 1
  • 1
SimplyInk
  • 5,832
  • 1
  • 18
  • 27