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: , , , , , ,

16 Responses to “SOLR: java.io.FileNotFoundException: no segments* file found”

  1. Andreas Stephan Says:

    Thank you! This saved my day

  2. Joe Hansen Says:

    This saved my day too! :)

  3. Ritesh Says:

    Thanks a lot for posting this. I would have spent hours trying to find what’s the problem.

  4. ed Says:

    wow, nice one. was banging my head.
    thanks for that!

  5. Rodney Says:

    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.

  6. Sean Says:

    Thanks for this. Would never have figured this out on my own

  7. Markus Möller Says:

    Oh dear! Sometimes the solution is so simple.
    You saved my day.

  8. Martin S. Says:

    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! :-)

  9. Fiona Says:

    Thanks. it helps me to save a lot of time ;)

  10. Holger Says:

    At least this will save my second day! :-) Thanx!

  11. Ayuda Joomla Says:

    Thanks!! This was the solution I needed!!

  12. Christoph Says:

    Thanks, saved me some hours

  13. Eun Song Says:

    Thank you~!!!! Saved me lots of hours~!

  14. David Says:

    You’ve saved a lot of peoples’ days! Mine included, thanks.

  15. Chris Says:

    Ditto Rodney! You rock! This has been driving me nuts!!!!!

  16. Panayotis Matsinopoulos Says:

    You saved my day!!!! Thanks a lot.

Leave a Reply