lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: optimization behaviour
Date Thu, 10 May 2007 19:28:35 GMT
On 5/10/07, karl wettin <karl.wettin@gmail.com> wrote:
> I really want to use document numbers as a secondary key in my object
> storage. If I got it all right, the main problem is deleted documents
> and optimization. Are there any other issues?

Deleted documents are removed on segment merges (for documents marked
as deleted in those segments).

> Given this is true at all times, would it not be fairly easy to
> inspect the index prior to optimization in order to find out how
> document numbers will change during optimization?

Yes.

> I don't know too much about the file format and SegementMerger (as
> far as I know, this is the class that handle optimization), but what
> is it that makes it so hard to insert a document at the position of a
> deleted one?

Due to the nature of an inverted index, it's impossible w/o going over
the complete index looking for all references to that docid.

*but*, that happens anyway during segment merges, so it should be
possible at that time to index a new document in the place of the old.
 At this point, I'm not sure if the complexity involved is worth it to
be in Lucene core, but I'll keep an open mind.

-Yonik

---------------------------------------------------------------------
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