0

Can you please help me with this:

How can I reload the updated schema.xml using SolrJ?

Here is the link that says it is possible. But how to send this request?

Thanks in advance.

Regards, Sagar

Marko Bonaci
  • 5,622
  • 2
  • 34
  • 55

2 Answers2

1

Have a look at this answer. This should be the code you're looking for:

CoreAdminRequest adminRequest = new CoreAdminRequest();
adminRequest.setAction(CoreAdminAction.RELOAD);
CoreAdminResponse adminResponse = adminRequest.process(new CommonsHttpSolrServer(solrUrl));
NamedList<NamedList<Object>> coreStatus = adminResponse.getCoreStatus();
Community
  • 1
  • 1
javanna
  • 59,145
  • 14
  • 144
  • 125
0

Have you tried using

org.apache.solr.core.CoreContainer.reload(String coreName)

where coreName is the name of the SolrCore to reload.

Marko Bonaci
  • 5,622
  • 2
  • 34
  • 55
  • I don't think this is a correct answer: the code you mentioned is server side, while the question is about doing it from client side through solrj. – javanna Jun 06 '12 at 11:09