lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: Compound file don't work with lucene 3.3 or 3.4
Date Sun, 20 Nov 2011 09:44:06 GMT
Hi,

Lucene only uses CFS for very small segments, that don't exceed a specific
percentage of the index size. See the method LogMergePolicy.setNoCFSRatio
[http://lucene.apache.org/java/3_4_0/api/all/org/apache/lucene/index/LogMerg
ePolicy.html#setNoCFSRatio(double)].

The default is 10%, every segment larger than 0.1 of total index size will
not be made compound:
[http://lucene.apache.org/java/3_4_0/api/all/org/apache/lucene/index/LogMerg
ePolicy.html#DEFAULT_NO_CFS_RATIO]

In general for merge performance reason you should not change those values,
unless you are running out of file descriptors! If you have a static index
that never changes (e.g. that will be hosted on a CD-ROM), you can
forceMerge(1) it to one single segment with CFSRatio=1.0, in all other cases
it's not a good idea, especially if you do realtime indexing; in that case
you should use the new TieredMergePolicy not the old LogMergePolicy.

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: liugang [mailto:liugangc@gmail.com]
> Sent: Sunday, November 20, 2011 5:30 AM
> To: java-user@lucene.apache.org
> Subject: Compound file don't work with lucene 3.3 or 3.4
> 
> I use lucene 3.4 in my search app.  in default config, after indexing, my
index
> dir has several file such as *.tii, *.tis ..., and cfs file doesn't exist.
> 
> Then I use setUseCompoundFile(true) of logByteSizeMergePolicy, and result
is
> same.
> 
> I remember it's good with lucene 2.x.  has anybody same problem?
Appreciate
> for any response.
> 
> 发自我的 iPad
> ---------------------------------------------------------------------
> 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


Mime
View raw message