petite_abeille wrote:
Quick question regarding release note number 11:

What's the difference between IndexWriter.addIndexes(IndexReader[]) and IndexWriter.addIndexes(Directory[]) beside the fact that one takes an array of IndexReader and the other an array of Directory? Any functional differences? Is one way recommended over the other?

When merging lots of indexes (more than the mergeFactor), the Directory-based method will use fewer file handles and less memory, as it will only ever open mergeFactor indexes at once, while the IndexReader-based method requires that all indexes be open when passed. The primary advantage of the IndexReader-based method is that one can pass it IndexReaders that don't reside in a Directory (which is now possible, as one may completely re-implement the IndexReader API).


For most folks I think sticking with the old method is best. It's also been tested much more!

Doug


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



Reply via email to