On 5/10/07, karl wettin <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to