To enforce creation of CFS files, you have to set the CFS percentage to 100% (1.0) in the MergePolicy: http://goo.gl/X9pF3, http://goo.gl/QFKGf By default Lucene only created CFS files, if the segment size is larger than 10% of the whole index.
Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Simon Willnauer [mailto:simon.willna...@googlemail.com] > Sent: Friday, April 06, 2012 11:23 AM > To: java-user@lucene.apache.org > Subject: Re: weird multifile problems > > Hey, do you get multiple files per segment or multiple files per index? > The compoundfile system writes a .cfs file (and a .cfe file in trunk) per > segment. So if you are seeing multiple .cfs fiels Lucene is actually doing > what > you want. If there are files like .fdt/fdx or tii/tis then the segment is not > using > CFS. Yet, if you see multiple CFS files then you have an index with more than > one segment. Those segments are written during indexing and merged > together as the number of segments grows which is just fine. > > hope that helps. > > simon > > On Fri, Apr 6, 2012 at 7:54 AM, Chengcheng Zhao <zha...@act.buaa.edu.cn> > wrote: > > Hi guys, > > I am still learning Lucene, and I had a very weird problem yesterday > > that no matter what I did, I always got multifiles not compound file. > > By default, Lucene use compound file, but I just got this weird > > problem, even if I used > > setUseCompoundFile(true) explicitly... And my code is actually adapted > > from the book Lucene In Action 2ed and the demo code in > > lucene.apache.org... How can I fix this? > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org