Hi,
 I am using SolrJ to reindex a core in a multiCore setup. The general
flow of my program is as follows (pseudo code):

String solrHome = "/opt/solr/home";
File solrXml = new File( solrHome, "solr.xml" );
container = new CoreContainer();
container.load(solrHome, solrXml);
SolrServer solr = new EmbeddedSolrServer(container, "core1");
solr.deleteByQuery("*:*");
SolrInputDocument doc1 = new SolrInputDocument();
doc1.addField( "id", "id1", 1.0f );
doc1.addField( "name", "doc1", 1.0f );
Collection<SolrInputDocument> docs = new ArrayList<SolrInputDocument>();
docs.add( doc1 );
solr.commit();
SolrCore curCore = container.getCore("core1");
curCore.close();

I thought for sure by calling close(), I would also be releasing all
associated resources including the lock on the core that is
I would getting rid of the write.lock file.

I am using Solr 4.0 code from the development truck which is about a month old.

Any suggestion here appreciated.

Regards,

Koorosh

Reply via email to