Andrzej Bialecki wrote:

I have a thought ;) Perhaps you could use a FilteredIndexReader to maintain a
map between new IDs and old IDs, and remap on the fly. Although I think that
some parts of Lucene depend on the fact that in a normal index the IDs are
monotonically increasing ... this would complicate the issue.

Interesting thought! I've not yet looked into the guts of the ParallelReader, but can imagine that it could work, but it sounds like an effective rewrite of ParallelReader. Optimize would be a problem though as optimizing this index would then mean the mapping table would need recreation (I'm assuming the optimization would muck up the Ids if only the parallel index was optimized).

You'd also need to get the new doc Id for each doc that is added. Are docIds allocated during addDocument or during the commit?

Antony



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to