The approach we have discussed in an earlier thread uses: writer.addIndexes(new SortingAtomicReader(...));
I want to confirm (this is not absolutely clear to me yet) that the above call will not create multiple segments - i.e., the output will be optimized. We are also trying another approach - sorting the documents in Hadoop - so that we can repeatedly call writer.addDocument(...) providing documents in the correct order. How can we make sure that the final output contains documents in a single segment and in the order in which they were added? Thanks, Sriram.