lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Britske <>
Subject addIndexesNoOptimize on shards --> is docid deterministic and calculable?
Date Wed, 04 Nov 2009 14:23:21 GMT


say I have: 
- Indexreader[] readers = {reader1, reader2, reader3} //containing all
different docs
- I know the internal docids of documents in reader1, reader2, reader3

Does doing IndexWriter.addIndexesNoOptimize(Indexreader[] readers) on these
readers give me a determinstic and calculable set of docids on the documents
in the resulting documentWriter? 

i.e: from 
"The numbers stored in each segment are unique only within the segment, and
must be converted before they can be used in a larger context. The standard
technique is to allocate each segment a range of values, based on the range
of numbers used in that segment. To convert a document number from a segment
to an external value, the segment's base document number is added."

Does assinging docids in addIndexesNoOptimize work like this? 
in other words: 
- docids of docs in reader1 stay the same in indexwriter
- docids of docs in reader2 are incremented by;
- docids of docs in reader3 are incremented by +

View this message in context:
Sent from the Lucene - Java Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message