Woops -- disregard this! Chris' approach will work. And, we don't need addParallelIndices!

Mike

Michael McCandless wrote:


I don't think this will do the right thing in this case, because addIndexes "appends" the documents from all indices together.

Whereas John wants to "merge in" a new field into all docs in an existing index.

Really what we need is a new "addParallellIndices" method. I think, conceptually, it's really not that hard to do ("it's just software"), especially if the fields are completely orthogonal (which is the case here, I think)? We would need a variant of SegmentMerger, that instead of appending everything, would "splice" the indices together, doc by doc. The posting lists should be especially simple since each field is contiguous in the prx/frq files.

Mike

Chris Hostetter wrote:


: I have to keep one index though. Is there a way to reproduce an index from
: an indexReader?

asuming you have indexes that work in conjunction with eachther they
way you want when using ParallelReader, you should (in theory) be able to
use...

   ParallelReader r = ...;
   IndexWriter w = new IndexWRiter(...);
   w.addIndexes(new IndexReader[] { r });
   w.close();

...to "combine" those indexes into a single physical index.  but i've
never personally tried it. there may be quirks about ParallelReader that
prevent this from working.


-Hoss


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




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

Reply via email to