Reputation: 31
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
Upvotes: 0
Views: 354
Reputation: 60195
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();
Upvotes: 1
Reputation: 5708
Have you tried using
org.apache.solr.core.CoreContainer.reload(String coreName)
where coreName
is the name of the SolrCore to reload.
Upvotes: 0