Package proj.zoie.api.impl

Examples of proj.zoie.api.impl.ZoieMergePolicy


    // hao: autocommit is set to false with this constructor
    IndexWriter idxWriter = new IndexWriter(_directory, analyzer, create, MaxFieldLength.UNLIMITED);
    // TODO disable compound file for RAMDirecory when lucene bug is fixed
    idxWriter.setUseCompoundFile(false);
    idxWriter.setMergeScheduler(_mergeScheduler);
    ZoieMergePolicy mergePolicy = new ZoieMergePolicy(idxWriter);
    mergePolicy.setMergePolicyParams(_mergePolicyParams);
    idxWriter.setMergePolicy(mergePolicy);
    idxWriter.setRAMBufferSizeMB(3);

    if (similarity != null)
    {
View Full Code Here


    boolean create = !IndexReader.indexExists(directory)
    // hao: autocommit is set to false with this constructor
    IndexWriter idxWriter = new IndexWriter(directory, analyzer, create, _deletionPolicy, MaxFieldLength.UNLIMITED);
    idxWriter.setMergeScheduler(_mergeScheduler);

    ZoieMergePolicy mergePolicy = new ZoieMergePolicy(idxWriter);
    mergePolicy.setMergePolicyParams(_mergePolicyParams);
    idxWriter.setRAMBufferSizeMB(5);

    idxWriter.setMergePolicy(mergePolicy);

    if (similarity != null)
View Full Code Here

  @Override
  public void open() throws IOException {
    if (_closed) {
      IndexWriterConfig idxWriterConfig = new IndexWriterConfig(Version.LUCENE_43,
          new StandardAnalyzer(Version.LUCENE_43));
      idxWriterConfig.setMergePolicy(new ZoieMergePolicy());
      idxWriterConfig.setOpenMode(OpenMode.CREATE_OR_APPEND);
      _idxWriter = new IndexWriter(_dir, idxWriterConfig);
      updateReader();
      _closed = false;
    }
View Full Code Here

    if (_indexWriter != null) {
      return _indexWriter;
    }

    ZoieMergePolicy mergePolicy = new ZoieMergePolicy();
    mergePolicy.setMergePolicyParams(_mergePolicyParams);
    mergePolicy.setUseCompoundFile(false);

    IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_43, analyzer);
    config.setOpenMode(OpenMode.CREATE_OR_APPEND);
    config.setMergeScheduler(_mergeScheduler);
    config.setMergePolicy(mergePolicy);
View Full Code Here

    }

    Directory directory = _dirMgr.getDirectory(true);
    log.info("opening index writer at: " + _dirMgr.getPath());

    ZoieMergePolicy mergePolicy = new ZoieMergePolicy();
    mergePolicy.setMergePolicyParams(_mergePolicyParams);

    // hao: autocommit is set to false with this constructor
    IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_43, analyzer);
    config.setOpenMode(OpenMode.CREATE_OR_APPEND);
    _deletionPolicy = new ZoieIndexDeletionPolicy();
View Full Code Here

TOP

Related Classes of proj.zoie.api.impl.ZoieMergePolicy

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.