/** * Test that complements does not cause a failure when using a parallel reader */ @Test public void testComplementsWithParallerReader() throws Exception { IndexReader origReader = indexReader; ParallelAtomicReader pr = new ParallelAtomicReader(SlowCompositeReaderWrapper.wrap(origReader)); indexReader = pr; try { doTestComplements(); } finally { indexReader = origReader; } }
public static AtomicReader addPrimeDoc(AtomicReader atomicReader, boolean newRow, String currentRowId) throws IOException { AtomicReaderContext context = DirectoryReader.open(newRow ? _directoryNewRow : getDirectoryUpdateRow(currentRowId)) .leaves().get(0); return new ParallelAtomicReader(true, setDocSize(context.reader(), atomicReader.maxDoc()), atomicReader); }