Andrzej Bialecki wrote:
If so, then in the trunk/ version of Lucene, is there any way to figure out (predictably) how internal document numbers are reassigned after calling optimize() ?
If each document has an indexed id field in both indexes, then you could simply use a FieldCache of that id field in each index to determine the mapping. You'd have to re-create the map from scratch each time either index changed, but it shouldn't be too slow. FieldCache creation just iterates through terms and then through the TermDocs of each of those terms, sequentially accessing the tis and frq files. Then creating the mapping you need would require something like a few HashMap accesses per document. Would that be too slow?
Alternately, you could wait for LUCENE-847, and implement a FilterMergePolicy that tracks document id changes.
Doug --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]