Actually, segments.gen is created by current Lucene versions. It records the current generation (the _N in segments_N) in the index, as a fallback in case directory listing of the files fails to locate the segments_N file (eg on filesystems, like NFS, where the directory listing may come from a stale cache).
Older Lucene versions (before 2.1) created only the file "segments". Mike On Wed, Jul 15, 2009 at 1:43 AM, Shalin Shekhar Mangar<shalinman...@gmail.com> wrote: > On Wed, Jul 15, 2009 at 8:46 AM, Francis Yakin <fya...@liquid.com> wrote: > >> >> I just upgraded our solr to 1.3.0 >> >> After I deployed the solr apps, I noticed there are: >> >> Segments_2 and segments.gen and there are 3 folder spellchecker1, >> spellchecker2 and spellcheckerFile >> >> What's these for? When I deleted them, I need bounce the apps again and it >> will generate the new ones again. >> > > > segments.gen used to be created by older versions of Lucene. Since Solr 1.3, > a file named segments_N (N=1,2,3...) will be created. Both exist because the > new Solr version is pointing to an index created by the earlier Solr > version. There's no harm in keeping it as-is, however if you want, you can > clean the index directory and re-index all documents to get rid of the > segments.gen file. > > The spellchecker directories are created by the SpellCheckComponent. You can > comment out all the sections related to SpellCheckComponent from your > solrconfig.xml and delete these directories. > > -- > Regards, > Shalin Shekhar Mangar. >