<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">400</int><int name="QTime">317</int></lst><lst name="error"><lst name="metadata"><str name="error-class">org.apache.solr.common.SolrException</str><str name="root-error-class">org.apache.solr.core.SolrResourceNotFoundException</str></lst><str name="msg">Error CREATEing SolrCore 'dynamicCore': Unable to create core [dynamicCore] Caused by: Can't find resource 'solrconfig.xml' in classpath or 'C:\solr\server\solr\dynamicCore'</str><int name="code">400</int></lst>
</response>
const string solrUrl = "http://localhost:8980/solr";
Startup.Init<Files>(solrUrl);
var HeaderParser = ServiceLocator.Current.GetInstance<ISolrHeaderResponseParser>();
var StatusParser = ServiceLocator.Current.GetInstance<ISolrStatusResponseParser>();
ISolrCoreAdmin solrCoreAdmin = new SolrCoreAdmin(new SolrConnection(solrUrl), HeaderParser, StatusParser);
try
{
/// Get the status of all registered cores:
IList<CoreResult> coreStatus = solrCoreAdmin.Status();
/// Get the status of a single core:
var coreStatus1 = solrCoreAdmin.Status("core1");
solrCoreAdmin.Create(coreName: "dynamicCore", instanceDir: "dynamicCore", configFile: "solrconfig.xml", schemaFile: "managed-schema", dataDir: "data");
MessageBox.Show("Done");
}
catch (Exception ex)
{
Clipboard.SetText(ex.Message);
MessageBox.Show(ex.Message);
}
--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at https://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.