Sebastian Marius Kirsch wrote:
I took up your suggestion to use a ParallelReader for adding more fields to existing documents. I now have two indexes with the same number of documents, but different fields.
Does search work using the ParalleReader?
One field is duplicated (the id field.)
Why is this duplicated? Just curious. That shouldn't cause a problem.
I wrote a small class to merge those two indexes into one index; it is attached to this message. However, when I run this class in order to merge the two indexes, I get a NullPointerException:
Why are you merging? Why not just search using the ParallelReader? Again, just curious. This should work.
Exception in thread "main" java.lang.NullPointerException at org.apache.lucene.index.ParallelReader$ParallelTermPositions.seek(ParallelReader.java:318) at org.apache.lucene.index.ParallelReader$ParallelTermDocs.seek(ParallelReader.java:294) at org.apache.lucene.index.SegmentMerger.appendPostings(SegmentMerger.java:325) at org.apache.lucene.index.SegmentMerger.mergeTermInfo(SegmentMerger.java:296) at org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java:270) at org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java:234) at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:96) at org.apache.lucene.index.IndexWriter.addIndexes(IndexWriter.java:596) at org.sebastiankirsch.thesis.util.ParallelIndexMergeTool.main(ParallelIndexMergeTool.java:27)
This could be a bug. I have not tested merging with a ParallelReader. Can you please try to adding a test case to TestParallelReader that demonstrates this?
Thanks, Doug --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]