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 prashant ullegaddi <pr...@gmail.com> on 2009/08/05 18:16:54 UTC

What happens after merging?

Hi,

I've some indexes. As you all know, each has these files:
_0.fdt  _0.fdx  _hqy.fnm  _hqy.frq  _hqy.nrm  _hqy.prx  _hqy.tii  _hqy.tis
segments_2  segments.gen

Once I merge those indexes into single index by (IndexWriter's
addIndexes()), the merged index has
only 3 files:
_0.cfs  segments_2  segments.gen

Search works fine. I out of interest want to know what happened in the
background. Where frequency
data (earlier present in *.frq) is stored? Where proximity info (*.prx) is
stored? What happened to those
files? Why there is only one compound file *.cfs?

Thanks,
Prashant.

Re: What happens after merging?

Posted by Simon Willnauer <si...@googlemail.com>.
Hi there,
when you use addIndexes() the IndexWriter merges the provided indexes
it as well as the index the IndexWriter was opened on into one single
index. It seem like you are using compound file system with the
IndexWriter you add your other indexes too. This instance takes all
documents and their data and writes them into one index - just like
adding all documents you have in the other indexes to one single
IndexWriter. Eventually the IndexWriter will run
IndexWriter#optimize(). While the IndexWriter add document to the
target index it might create one or more segments depending on your
configuration (#maxMergeDoc() and friends). The optimze call will
merge those segments into a signle one (if default MergePolicy is set
- other policies can do different things).

hope that helps...

Simon

On Wed, Aug 5, 2009 at 6:16 PM, prashant
ullegaddi<pr...@gmail.com> wrote:
> Hi,
>
> I've some indexes. As you all know, each has these files:
> _0.fdt  _0.fdx  _hqy.fnm  _hqy.frq  _hqy.nrm  _hqy.prx  _hqy.tii  _hqy.tis
> segments_2  segments.gen
>
> Once I merge those indexes into single index by (IndexWriter's
> addIndexes()), the merged index has
> only 3 files:
> _0.cfs  segments_2  segments.gen
>
> Search works fine. I out of interest want to know what happened in the
> background. Where frequency
> data (earlier present in *.frq) is stored? Where proximity info (*.prx) is
> stored? What happened to those
> files? Why there is only one compound file *.cfs?
>
> Thanks,
> Prashant.
>

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