gpt4 book ai didi

proj.zoie.api.ZoieMultiReader.getSequentialSubReaders()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 05:10:31 26 4
gpt4 key购买 nike

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

ZoieMultiReader.getSequentialSubReaders介绍

暂无

代码示例

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

@Override
public void setDelDocIds()
{
 ZoieIndexReader<R>[] subReaders = getSequentialSubReaders();
 for(ZoieIndexReader<R> subReader : subReaders)
 {
  subReader.setDelDocIds();
 }
}

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

@SuppressWarnings("unchecked")
private ZoieMultiReader(DirectoryReader in, IndexReaderDecorator<R> decorator,
  ZoieSubReaderWrapper<R> wrapper) throws IOException {
 super(in, wrapper);
 _subZoieReaders = (List<ZoieSegmentReader<R>>) getSequentialSubReaders();
 _decorator = decorator;
 _readerMap = new HashMap<String, ZoieSegmentReader<R>>();
 _decoratedReaders = null;
 init();
}

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

@SuppressWarnings("unchecked")
private ZoieMultiReader(DirectoryReader in, IndexReaderDecorator<R> decorator,
  ZoieSubReaderWrapper<R> wrapper) throws IOException {
 super(in, wrapper);
 _subZoieReaders = (List<ZoieSegmentReader<R>>) getSequentialSubReaders();
 _decorator = decorator;
 _readerMap = new HashMap<String, ZoieSegmentReader<R>>();
 _decoratedReaders = null;
 init();
}

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

public DocIDMapper<Object> getDocIDMapper(ZoieMultiReader<?> reader)
 {
  for(ZoieIndexReader<?>r : reader.getSequentialSubReaders())
  {
   r.setDocIDMapper(NullDocIDMapper.INSTANCE);
  }
  return NullDocIDMapper.INSTANCE;
 }  
}

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

@Override
public void markDeletes(LongSet delDocs, LongSet deletedUIDs)
{
 ZoieIndexReader<R>[] subReaders = getSequentialSubReaders();
 if(subReaders != null && subReaders.length > 0)
 {
  for(int i = 0; i < subReaders.length; i++)
  {
   ZoieSegmentReader<R> subReader = (ZoieSegmentReader<R>)subReaders[i];
   subReader.markDeletes(delDocs, deletedUIDs);
  }
 }
}

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

@Override
public void commitDeletes()
{
 ZoieIndexReader<R>[] subReaders = getSequentialSubReaders();
 if(subReaders != null && subReaders.length > 0)
 {
  for(int i = 0; i < subReaders.length; i++)
  {
   ZoieSegmentReader<R> subReader = (ZoieSegmentReader<R>)subReaders[i];
   subReader.commitDeletes();
  }
 }
}

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

@Override
public void onIndexReaderCleanUp(ZoieIndexReader<IndexReader> indexReader) {
 if (indexReader instanceof ZoieMultiReader) {
  ZoieSegmentReader[] segments = (ZoieSegmentReader[]) ((ZoieMultiReader) indexReader).getSequentialSubReaders();
  for (ZoieSegmentReader segmentReader : segments) {
   handleSegment(segmentReader);
  }
 } else if (indexReader instanceof ZoieSegmentReader) {
  handleSegment((ZoieSegmentReader) indexReader);
 } else {
  throw new UnsupportedOperationException("Only segment and multisegment readers can be handled");
 }
 
}
private void handleSegment(ZoieSegmentReader segmentReader) {

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

public DocIDMapper<?> getDocIDMapper(ZoieMultiReader<?> multireader) {
  final ZoieSegmentReader<?>[] subreaders =(ZoieSegmentReader<?>[])(multireader.getSequentialSubReaders());
  final int[] starts = multireader.getStarts();
  for (int i = 0; i < subreaders.length; ++i){
    ZoieSegmentReader<?> subReader = subreaders[i];
    DocIDMapper<?> mapper = subReader.getDocIDMaper();
    if (mapper == null){
      mapper = new DocIDMapperImpl(subReader.getUIDArray());
    }
    subReader.setDocIDMapper(mapper);
  }
final DocIDMapper[] mappers = new DocIDMapper[subreaders.length];
for(int i=0; i< subreaders.length; i++)
{
 mappers[i] = subreaders[i].getDocIDMaper();
}
final int bound = subreaders.length-1;
  return new DefaultDocIDMapper(bound, mappers, starts);
  
}

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

.getSequentialSubReaders());
final int[] starts = reader.getStarts();

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