SOLR: java.io.FileNotFoundException: no segments* file found
While playing around with one of my development SOLR installations (this time under Windows), I suddenly got a weird error message when feeding data to one of the fresh cores.
SEVERE: java.lang.RuntimeException: java.io.FileNotFoundException: no segments* file found in org.apache.lucene.store.SimpleFSDirectory@C:\temp\solr\*\data\index: files:
Taking a look at the contents of the index\ directory, it was in fact empty. Seems weird, but my initial guess was that Lucene / SOLR would treat this as a new installation and create the files.
Turns out the issue is that it won’t – as long as the index directory exists, Lucene / SOLR goes looking for the segment files.
Thanks to an old post to the solr-dev list by Yonik, the easiest fix is to simply delete the index directory and restart your applet container (Tomcat in this case).
Tags: apache tomcat, exception, index directory, Java, lucene, Solr, solr-dev

March 22nd, 2010 at 11:03
Thank you! This saved my day
March 22nd, 2010 at 19:26
This saved my day too! :)
March 24th, 2010 at 00:15
Thanks a lot for posting this. I would have spent hours trying to find what’s the problem.
May 13th, 2010 at 03:44
wow, nice one. was banging my head.
thanks for that!
June 11th, 2010 at 17:04
I can only say that I think I love you :) This saved my day. It is indeed annoying. I may have to submit a patch.
June 11th, 2010 at 20:57
Thanks for this. Would never have figured this out on my own
August 26th, 2010 at 08:10
Oh dear! Sometimes the solution is so simple.
You saved my day.
September 16th, 2010 at 14:43
Cheers to this one. I emptied my index directory and restarted Apache without anything happening. The solutions was to simply delete the whole index folder! :-)
November 16th, 2010 at 05:36
Thanks. it helps me to save a lot of time ;)
January 19th, 2011 at 18:50
At least this will save my second day! :-) Thanx!
February 18th, 2011 at 10:48
Thanks!! This was the solution I needed!!
June 29th, 2011 at 12:37
Thanks, saved me some hours
July 11th, 2011 at 21:39
Thank you~!!!! Saved me lots of hours~!
August 19th, 2011 at 02:35
You’ve saved a lot of peoples’ days! Mine included, thanks.
November 28th, 2011 at 23:23
Ditto Rodney! You rock! This has been driving me nuts!!!!!
December 15th, 2011 at 14:09
You saved my day!!!! Thanks a lot.