Package proj.zoie.api

Examples of proj.zoie.api.DirectoryManager


    int numReplicas = Integer.parseInt(args[2]);
    System.out.println("source index: " + srcIndex.getAbsolutePath());
    System.out.println("target index: " + targetIndex.getAbsolutePath());
    System.out.println("num replications: " + numReplicas);
    IndexReader reader = null;
    DirectoryManager srcDirMgr = new DefaultDirectoryManager(srcIndex);
    try {
      Directory dir = srcDirMgr.getDirectory();
      reader = DirectoryReader.open(dir);
      System.out.println("source index, numdocs: " + reader.numDocs());
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      if (reader != null) {
        reader.close();
      }
      reader = null;
    }
    DirectoryManager targetDirMgr = new DefaultDirectoryManager(targetIndex);

    Directory targetDir = targetDirMgr.getDirectory(true);

    IndexWriter writer = null;
    try {
      IndexWriterConfig idxWriterConf = new IndexWriterConfig(Version.LUCENE_43,
          new StandardAnalyzer(Version.LUCENE_43));
View Full Code Here

TOP

Related Classes of proj.zoie.api.DirectoryManager

Copyright © 2018 www.massapicom. 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.