Package org.apache.lucene.index

Examples of org.apache.lucene.index.DirectoryReader.leaves()


    int ordinalMap[] = map.getMap();
    FacetIndexingParams params = new DefaultFacetIndexingParams();

    DirectoryReader reader = DirectoryReader.open(srcIndexDir, -1);
    List<AtomicReaderContext> leaves = reader.leaves();
    AtomicReader wrappedLeaves[] = new AtomicReader[leaves.size()];
    for (int i = 0; i < leaves.size(); i++) {
      wrappedLeaves[i] = new OrdinalMappingAtomicReader(leaves.get(i).reader(), ordinalMap, params);
    }
    try {
View Full Code Here


    ManagedMultiReader multiReader = (ManagedMultiReader) indexReader;
    IndexReader[] directoryReaders = multiReader.subReaders;
    ArrayList<IndexReader> segmentReaders = new ArrayList<IndexReader>( 20 );
    for ( IndexReader reader : directoryReaders ) {
      DirectoryReader directoryReader = (DirectoryReader)reader;
      List<AtomicReaderContext> leaves = directoryReader.leaves();
      for ( AtomicReaderContext readerContext : leaves ) {
        segmentReaders.add( readerContext.reader() );
      }
    }
    return segmentReaders;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.