Package proj.zoie.api

Examples of proj.zoie.api.DefaultDirectoryManager


  @Deprecated
  public ZoieSystem(File idxDir, ZoieIndexableInterpreter<D> interpreter,
      IndexReaderDecorator<R> indexReaderDecorator, DocIDMapperFactory docIdMapperFactory,
      Analyzer analyzer, Similarity similarity, int batchSize, long batchDelay, boolean rtIndexing,
      Comparator<String> versionComparator, boolean skipBadRecord) {
    this(new DefaultDirectoryManager(idxDir), interpreter, indexReaderDecorator,
        docIdMapperFactory, analyzer, similarity, batchSize, batchDelay, rtIndexing,
        versionComparator, skipBadRecord);
  }
View Full Code Here


    zoieConfig.setReadercachefactory(SimpleReaderCache.FACTORY);

    String modeConf = topConf.getString("perf.directory.type", "file");
    DIRECTORY_MODE mode = modeMap.get(modeConf);
    if (mode == null) mode = DIRECTORY_MODE.SIMPLE;
    DirectoryManager dirMgr = new DefaultDirectoryManager(idxDir, mode);

    IndexReaderDecorator<IndexReader> indexReaderDecorator = new DefaultIndexReaderDecorator();

    File queryFile = new File(topConf.getString("perf.query.file"));
    if (!queryFile.exists()) {
View Full Code Here

    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.DefaultDirectoryManager

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.