You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Francis Yakin <fy...@liquid.com> on 2009/07/15 05:16:41 UTC

Segments_2 and segments.gen under Index folder and spellchecker1, spellchecker2, spellcheckerFile folder

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.

Thanks

Francis


Re: Segments_2 and segments.gen under Index folder and spellchecker1, spellchecker2, spellcheckerFile folder

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Jul 15, 2009 at 4:45 PM, Michael McCandless <
lucene@mikemccandless.com> wrote:

> 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".
>

Thanks for clarifying that Mike!

-- 
Regards,
Shalin Shekhar Mangar.

Re: Segments_2 and segments.gen under Index folder and spellchecker1, spellchecker2, spellcheckerFile folder

Posted by Michael McCandless <lu...@mikemccandless.com>.
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<sh...@gmail.com> wrote:
> On Wed, Jul 15, 2009 at 8:46 AM, Francis Yakin <fy...@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.
>

Re: Segments_2 and segments.gen under Index folder and spellchecker1, spellchecker2, spellcheckerFile folder

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Jul 15, 2009 at 8:46 AM, Francis Yakin <fy...@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.