Java 类org.apache.lucene.index.ParallelAtomicReader 实例源码

项目:NYBC    文件:TestFacetsAccumulatorWithComplement.java   
/**
 * 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;
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestFacetsAccumulatorWithComplement.java   
/**
 * 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;
  }
}
项目:incubator-blur    文件:PrimeDocOverFlowHelper.java   
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);
}