gpt4 book ai didi

proj.zoie.impl.indexing.ZoieSystem.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 21:53:31 28 4
gpt4 key购买 nike

本文整理了Java中proj.zoie.impl.indexing.ZoieSystem.<init>()方法的一些代码示例,展示了ZoieSystem.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoieSystem.<init>()方法的具体详情如下:
包路径:proj.zoie.impl.indexing.ZoieSystem
类名称:ZoieSystem
方法名:<init>

ZoieSystem.<init>介绍

[英]Creates a new ZoieSystem.
[中]创建一个新的ZoieSystem。

代码示例

代码示例来源:origin: com.linkedin.zoie/zoie-core

ZoieSystem<R, D> createZoie(DirectoryManager dirmgr)
{
 return new ZoieSystem<R, D>(dirmgr, _interpreter, _decorator, _zConfig);
}

代码示例来源:origin: senseidb/zoie

ZoieSystem<R, D> createZoie(DirectoryManager dirmgr) {
 return new ZoieSystem<R, D>(dirmgr, _interpreter, _decorator, _zConfig);
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

ZoieSystem<R, D> createZoie(DirectoryManager dirmgr) {
 return new ZoieSystem<R, D>(dirmgr, _interpreter, _decorator, _zConfig);
}

代码示例来源:origin: senseidb/zoie

public Pair(File zoieOneRoot, DIRECTORY_MODE dirMode, IndexCopier indexCopier,
  ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> decorator,
  ZoieConfig zoieConfig, Zoie<R, D> zoieTwo) {
 _zoieOneRoot = zoieOneRoot;
 _indexCopier = indexCopier;
 _interpreter = interpreter;
 _decorator = decorator;
 _zoieConfig = zoieConfig;
 _zoieTwo = zoieTwo;
 _activeReaders = new HashMap<IndexReader, ZoieRef>();
 // Initialize zoieOne:
 if (_zoieOneRoot == null) {
  throw new IllegalArgumentException("zoieOneRoot cannot be null.");
 }
 if (_zoieOneRoot.exists()) {
  File[] files = _zoieOneRoot.listFiles();
  Arrays.sort(files);
  for (int i = files.length - 1; i >= 0; --i) {
   if (new File(files[i], COMMIT_FILE).exists()) {
    log.info("Found latest zoieOne index: " + files[i].getAbsolutePath());
    DirectoryManager dirMgr = new DefaultDirectoryManager(files[i], dirMode);
    _zoieOne = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zoieConfig);
    break;
   }
  }
 }
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

public Pair(File zoieOneRoot, DIRECTORY_MODE dirMode, IndexCopier indexCopier,
  ZoieIndexableInterpreter<D> interpreter, IndexReaderDecorator<R> decorator,
  ZoieConfig zoieConfig, Zoie<R, D> zoieTwo) {
 _zoieOneRoot = zoieOneRoot;
 _indexCopier = indexCopier;
 _interpreter = interpreter;
 _decorator = decorator;
 _zoieConfig = zoieConfig;
 _zoieTwo = zoieTwo;
 _activeReaders = new HashMap<IndexReader, ZoieRef>();
 // Initialize zoieOne:
 if (_zoieOneRoot == null) {
  throw new IllegalArgumentException("zoieOneRoot cannot be null.");
 }
 if (_zoieOneRoot.exists()) {
  File[] files = _zoieOneRoot.listFiles();
  Arrays.sort(files);
  for (int i = files.length - 1; i >= 0; --i) {
   if (new File(files[i], COMMIT_FILE).exists()) {
    log.info("Found latest zoieOne index: " + files[i].getAbsolutePath());
    DirectoryManager dirMgr = new DefaultDirectoryManager(files[i], dirMode);
    _zoieOne = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zoieConfig);
    break;
   }
  }
 }
}

代码示例来源:origin: senseidb/zoie

public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir,
  ZoieIndexableInterpreter<D> interpreter, ZoieConfig zoieConfig) {
 return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(),
   zoieConfig);
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir,
  ZoieIndexableInterpreter<D> interpreter, ZoieConfig zoieConfig) {
 return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(),
   zoieConfig);
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

_zoieOne = new ZoieSystem(dirMgr, _interpreter, _decorator, _zoieConfig);
break;

代码示例来源:origin: com.linkedin.zoie/zoie-core

public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir, ZoieIndexableInterpreter<D> interpreter,ZoieConfig zoieConfig)
{
  return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(), zoieConfig);
}

代码示例来源:origin: senseidb/zoie

/**
 * @deprecated use {@link ZoieSystem#buildDefaultInstance(File, ZoieIndexableInterpreter, ZoieConfig)}
 * @param idxDir
 * @param interpreter
 * @param analyzer
 * @param similarity
 * @param batchSize
 * @param batchDelay
 * @param realtime
 * @param versionComparator
 */
@Deprecated
public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir,
  ZoieIndexableInterpreter<D> interpreter, Analyzer analyzer, Similarity similarity,
  int batchSize, long batchDelay, boolean realtime, Comparator<String> versionComparator) {
 return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(),
   analyzer, similarity, batchSize, batchDelay, realtime, versionComparator, false);
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

/**
 * @deprecated use {@link ZoieSystem#buildDefaultInstance(File, ZoieIndexableInterpreter, ZoieConfig)}
 * @param idxDir
 * @param interpreter
 * @param analyzer
 * @param similarity
 * @param batchSize
 * @param batchDelay
 * @param realtime
 * @param versionComparator
 */
@Deprecated
public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir,
  ZoieIndexableInterpreter<D> interpreter, Analyzer analyzer, Similarity similarity,
  int batchSize, long batchDelay, boolean realtime, Comparator<String> versionComparator) {
 return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(),
   analyzer, similarity, batchSize, batchDelay, realtime, versionComparator, false);
}

代码示例来源:origin: senseidb/zoie

protected List<ZoieSystem<R, D>> loadArchiveZoies() {
 List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>();
 long t0 = System.currentTimeMillis();
 List<File> dirs = _dirMgrFactory.getAllArchivedDirs();
 for (File dir : dirs) {
  try {
   DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode());
   ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig);
   zoie.start();
   archives.add(zoie);
  } catch (Exception e) {
   log.error("Load index: " + dir + " failed.", e);
  }
 }
 log.info("load " + dirs.size() + " archived indices of " + getSizeBytes() + " bytes in "
   + (System.currentTimeMillis() - t0) + "ms");
 return archives;
}

代码示例来源:origin: com.senseidb.zoie/zoie-core

protected List<ZoieSystem<R, D>> loadArchiveZoies() {
 List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>();
 long t0 = System.currentTimeMillis();
 List<File> dirs = _dirMgrFactory.getAllArchivedDirs();
 for (File dir : dirs) {
  try {
   DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode());
   ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig);
   zoie.start();
   archives.add(zoie);
  } catch (Exception e) {
   log.error("Load index: " + dir + " failed.", e);
  }
 }
 log.info("load " + dirs.size() + " archived indices of " + getSizeBytes() + " bytes in "
   + (System.currentTimeMillis() - t0) + "ms");
 return archives;
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

/**
 * @deprecated use {@link ZoieSystem#buildDefaultInstance(File, ZoieIndexableInterpreter, ZoieConfig)}
 * @param idxDir
 * @param interpreter
 * @param analyzer
 * @param similarity
 * @param batchSize
 * @param batchDelay
 * @param realtime
 * @param versionComparator
 * @return
 */
public static <D> ZoieSystem<IndexReader, D> buildDefaultInstance(File idxDir, ZoieIndexableInterpreter<D> interpreter,
  Analyzer analyzer, Similarity similarity, int batchSize, long batchDelay, boolean realtime, Comparator<String> versionComparator)
{
 return new ZoieSystem<IndexReader, D>(idxDir, interpreter, new DefaultIndexReaderDecorator(), analyzer, similarity, batchSize, batchDelay, realtime, versionComparator,false);
}

代码示例来源:origin: com.linkedin.zoie/zoie-core

protected List<ZoieSystem<R, D>> loadArchiveZoies()
{
 List<ZoieSystem<R, D>> archives = new ArrayList<ZoieSystem<R, D>>();
 long t0 = System.currentTimeMillis();
 List<File> dirs = _dirMgrFactory.getAllArchivedDirs();
 for(File dir : dirs)
 {
  IndexReader reader;
  try
  {
   DirectoryManager dirMgr = new DefaultDirectoryManager(dir, _dirMgrFactory.getMode());
   ZoieSystem<R, D> zoie = new ZoieSystem<R, D>(dirMgr, _interpreter, _decorator, _zConfig);
   zoie.start();
   archives.add(zoie);
  }
  catch (Exception e)
  {
   log.error("Load index: " + dir + " failed.", e);
  }
 }
 log.info("load "+dirs.size()+" archived indices of " + getSizeBytes() +" bytes in " + (System.currentTimeMillis() - t0) + "ms");
 return archives;
}

代码示例来源:origin: senseidb/zoie

Zoie<R, D> zoie = new ZoieSystem(dirMgr, _interpreter, _decorator, _zoieConfig);
if (_running) zoie.start();

代码示例来源:origin: com.senseidb.zoie/zoie-core

Zoie<R, D> zoie = new ZoieSystem(dirMgr, _interpreter, _decorator, _zoieConfig);
if (_running) zoie.start();

代码示例来源:origin: com.linkedin.zoie/zoie-core

Zoie zoie = new ZoieSystem(dirMgr, _interpreter, _decorator, _zoieConfig);
if (_running)
 zoie.start();

代码示例来源:origin: com.senseidb/sensei-core

ZoieSystem<BoboSegmentReader, T> zoie = new ZoieSystem<BoboSegmentReader, T>(dirMgr,
  _interpreter, _indexReaderDecorator, _zoieConfig);
if (_purgeFilter != null) {

代码示例来源:origin: senseidb/zoie

static PerfTestHandler buildZoieHandler(File idxDir, Configuration topConf, Configuration conf)
  throws Exception {
 ZoieConfig zoieConfig = new ZoieConfig();
 zoieConfig.setAnalyzer(new StandardAnalyzer(Version.LUCENE_43));
 zoieConfig.setBatchSize(100000);
 zoieConfig.setBatchDelay(10000);
 zoieConfig.setMaxBatchSize(100000);
 zoieConfig.setRtIndexing(true);
 zoieConfig.setVersionComparator(ZoiePerfVersion.COMPARATOR);
 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()) {
  throw new ConfigurationException(queryFile.getAbsolutePath() + " does not exist!");
 }
 ZoieSystem<IndexReader, String> zoieSystem = new ZoieSystem<IndexReader, String>(dirMgr,
   interpreter, indexReaderDecorator, zoieConfig);
 SearchQueryHandler queryHandler = new SearchQueryHandler(queryFile, zoieSystem);
 return new PerfTestHandler(zoieSystem, queryHandler);
}

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com