So I woke up this morning to find my shiny new Solr install had corrupted a core 😐 and I was unable to create a one in the UI

05/11/2015, 12:33:45
	
WARN
	
Config
	
XML parse warning in "solrres:/solrconfig.xml",​ line 1616,​ column 86: Include operation failed,​ reverting to fallback. Resource error reading file as XML (href='solrconfig_extra.xml'). Reason: Can't find resource 'solrconfig_extra.xml' in classpath or '/opt/solr/solr-4.10.2/example/solr/collection1/conf'
05/11/2015, 12:33:46
	
WARN
	
SolrResourceLoader
	
Solr loaded a deprecated plugin/analysis class [solr.FloatField]. Please consult documentation how to replace it accordingly.
05/11/2015, 12:33:46
	
WARN
	
SolrResourceLoader
	
Solr loaded a deprecated plugin/analysis class [solr.DateField]. Please consult documentation how to replace it accordingly.
05/11/2015, 12:33:47
	
WARN
	
RequestHandlers
	
Multiple requestHandler registered to the same name: /update ignoring: org.apache.solr.handler.UpdateRequestHandler
05/11/2015, 12:33:47
	
WARN
	
RequestHandlers
	
Multiple requestHandler registered to the same name: /update/csv ignoring: org.apache.solr.handler.UpdateRequestHandler
05/11/2015, 12:33:47
	
WARN
	
RequestHandlers
	
Multiple requestHandler registered to the same name: /update/json ignoring: org.apache.solr.handler.UpdateRequestHandler
05/11/2015, 12:33:47
	
ERROR
	
CoreContainer
	
Error creating core [candi_policy]: Error opening new searcher

The way I solved it was to go into the cores folder (for me, /opt/solr/solr-4.10.2/example/solr), and move the core folder out of there. Then create a new folder with the name of your core, a data folder within that, and then also in there cp -R the conf folder from the corrupted core folder you moved out of there.

Then all you need to do is restart Solr, and you can now create a fresh core in the UI. Once you have that, reindex your documents, and you’re all set to go again!

Update: It happened again this morning. I think it’s because I exit my VM and vagrant halt, which usually shuts everything down gracefully. So make sure you run /opt/solr/solr-4.10.2/bin/solr stop (or equivalent) before shutting down your machine.