On 9/17/2013 12:32 AM, YouPeng Yang wrote:
> Hi
>    Another werid problem.
>    When we setup the autocommit properties, we  suppose that the index
> fille will created every commited.So that the size of the index files will
> be large enough. We do not want to keep too many small files as [1].
> 
>    How to control the size of the index files.

An index segment gets created after every hard commit.   In the listing
that you sent, all the files starting with _28w are a single segment.
All the files starting with _28x are another segment.

Solr should be merging the segments when you get enough of them, unless
you have incorrectly set up your merge policy.  The default number of
segments that get merged is ten.  When you get ten segments, they will
be merged down to one.  This repeats until you have ten merged segments.
 At that point, those ten merged segments will be merged to make an even
larger segment.

You can bump up the number of open files allowed by your operating
system.  On Linux, this is controlled by the /etc/security/limits.conf
file.  Here are some example config lines for that file:

elyograg        hard    nofile  6144
elyograg        soft    nofile  4096
root            hard    nofile  6144
root            soft    nofile  4096

Alternatively, you can reduce the required number of files if you turn
on the UseCompoundFile setting, which is in the IndexConfig section.
This causes Solr to create a single file per index segment instead of
several files per segment.  The compound file may be slightly less
efficient, but the difference is likely to be very small.

https://cwiki.apache.org/confluence/display/solr/IndexConfig+in+SolrConfig


Reply via email to