user1382560
user1382560

Reputation: 31

solrj reload request

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

Answers (2)

javanna
javanna

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

Marko Bonaci
Marko Bonaci

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

Related Questions