lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <paul.elsc...@xs4all.nl>
Subject Re: Faking index merge by modifying segments file?
Date Tue, 01 Nov 2005 08:20:16 GMT
On Tuesday 01 November 2005 08:51, Otis Gospodnetic wrote:
> Hello,
> 
> I spent most of today talking to some people about Lucene, and one of
> them said how they would really like to have an "instantaneous index
> merge", and how he is thinking he could achieve that by simply opening
> segments file of one index, and adding segment names of the other
> index/indices, plus adjusting the segment size (SegSize in
> fileformats.html), thus creating a single (but unoptimized) index.
> 
> Any reactions to that?
> 
> I imagine this isn't quite that simple to implement, as one would have
> to renumber all documents, in order to avoid having multiple documents
> with the same document id.
> 
> Can anyone think of any other problems with this approach, or perhaps
> offer ideas for possible document renumbering?

Document numbers within segments are determined dynamically in the
index reader, so these should not be a problem. Each segment simply numbers
its documents from zero. Iirc the segment names determine the order
of the segments for an index reader.

I think creating a new index by adding segments from an existing one should
be fairly straightforward. Some care will be needed to avoid
clashes in the segment names. Also what should happen with
the index from which the segments are taken? Should the shared segments
be copied between indexes?
It's possible to share segments between indexes when the file system allows
files to be present in multiple directories.

Regards,
Paul Elschot





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


Mime
View raw message