You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chengcheng Zhao <zh...@act.buaa.edu.cn> on 2012/04/06 07:54:52 UTC

weird multifile problems

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?


RE: weird multifile problems

Posted by Uwe Schindler <uw...@thetaphi.de>.
> 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.

Sorry, other way round of course. Large segments stay without CFS by default.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: weird multifile problems

Posted by Uwe Schindler <uw...@thetaphi.de>.
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: uwe@thetaphi.de


> -----Original Message-----
> From: Simon Willnauer [mailto:simon.willnauer@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 <zh...@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-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: weird multifile problems

Posted by Simon Willnauer <si...@googlemail.com>.
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 <zh...@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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org