It's not easy for us to have the installer team do that (it's a big product).
We actually found IndexWriter.AddIndexes to do almost what we wanted: just pass in empty list of IndexReader's, and customize the mergedName to what we want it to be; I made extended IndexWriter to have this new method. public virtual void MergeToName(string mergedName) { AddIndexes(new IndexReader[] { } ); AddIndexes(new IndexReader[] { }, mergedName); // same as current AddIndexes but lets mergedName passed in } It has to have a merged segment with a random name (the 1st line), in case the segment name is already mergedName. Then it can merge to mergedName. Anways. Just want to share this if anyone else needs constant .cfs name in the generated index directory. -----Original Message----- From: Erick Erickson [mailto:[EMAIL PROTECTED] Sent: Thursday, May 03, 2007 6:25 PM To: java-user@lucene.apache.org Subject: Re: customizing index file name Oh, fix as in make constant, not fix as in broken <G>... No, I don't know of any way to do this. Can your installer just pack up everything in a directory? Erick On 5/3/07, Shaw, James <[EMAIL PROTECTED]> wrote: > > I mean specifying the name of the .csf file, rather than letting Lucene > come up with a name by itself. > > I'm actually using Lucene.Net, and we pre-index during our build and > want to include the index in the installer, but the installer can only > reference named files, and it wouldn't work if the .csf changes every > time we index. > > -----Original Message----- > From: Erick Erickson [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 03, 2007 4:56 PM > To: java-user@lucene.apache.org > Subject: Re: customizing index file name > > Uh, what do you mean "fix"? You shouldn't have to do anything > with it at all. What behavior are you observing that you want > to change and why? > > Erick > > On 5/3/07, Shaw, James <[EMAIL PROTECTED]> wrote: > > > > Does anyone know how to fix the .cfs file name in an index directory? > > The deletable and segments file names are always the same, but we have > > observed that the .cfs file name changes each time you index a content > > directory with some changes to the directory (some deleted files, > added > > files, etc). How is the name computed anyways? Is there any way to > fix > > it? Could there be other files generated in an index directory after > > optimization besides these 3 files (.cfs, deletable, and segments)? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]