Clemens,
On 6/1/22 13:41, Christopher Schultz wrote:
Clemens,
On 5/30/22 02:02, Clemens WYSS (Helbling Technik) wrote:
Given a connection to Solr ( e.g. adminSolrConnection )
CoreAdminRequest.Create createCoreRequest = new
CoreAdminRequest.Create();
createCoreRequest.setCoreName( coreName );
createCoreRequest.process( adminSolrConnection );
What is an "admin solr connection"? Is that any different than just a
plain-old HttpSolrClient instance?
I found that I needed a client that wasn't pointing to any existing
core, which wasn't a problem.
But I do get this error when trying to create the core:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:
Error from server at ${SOLR_BASE_URL}/solr: Error CREATEing SolrCore
'test_remote_create_core': Can't find resource 'solrconfig.xml' in
classpath or '${SOLR_HOME}/server/solr/test_remote_create_core'
Here's the code I used to create the core:
CoreAdminRequest car = new CoreAdminRequest.Create();
car.setCoreName("test_remote_create_core");
CoreAdminResponse response = car.process(solr);
I'd like to be able to bootstrap a core from my application if it
doesn't exist. I can supply whatever information is necessary, but I
need to be able to do it without doing anything other than making API
calls, either via SolrJ or directly via HTTP/REST.
Thanks,
-chris