gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-20 04:56:31 27 4
gpt4 key购买 nike

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

ZoieSegmentReader.getUIDArray介绍

暂无

代码示例

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

@Override
public DocIDMapper getDocIDMapper(final ZoieSegmentReader<?> reader) throws IOException {
 // Don't use getLiveDocs of ZoieSegmentReader, since ZoieSegmentReader take into account
 // pending delete doc
 return new DocIDMapperImpl(reader.getUIDArray());
}

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

@Override
public long[] load(BoboSegmentReader reader) throws IOException {
 IndexReader innerReader = reader.getInnerReader();
 if (innerReader instanceof ZoieSegmentReader) {
  ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) innerReader;
  return zoieReader.getUIDArray();
 } else {
  throw new IOException("inner reader not instance of " + ZoieSegmentReader.class);
 }
}

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

@Override
public DocIDMapper getDocIDMapper(final ZoieSegmentReader<?> reader) throws IOException {
 // Don't use getLiveDocs of ZoieSegmentReader, since ZoieSegmentReader take into account
 // pending delete doc
 return new DocIDMapperImpl(reader.getUIDArray());
}

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

private void handleSegment(ZoieSegmentReader segmentReader) {    
 onDelete(segmentReader, segmentReader.getUIDArray());      
}

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

private void handleSegment(ZoieSegmentReader<?> segmentReader) {
 onDelete(segmentReader, segmentReader.getUIDArray());
}

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

@Override
public int[] load(BoboSegmentReader reader) throws IOException {
 ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader());
 long[] uidArray = zoieReader.getUIDArray();
 return compositeActivityManager.getActivityValues().precomputeArrayIndexes(uidArray);
}

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

@SuppressWarnings("unchecked")
@Override
public void finalizeSegment(BoboSegmentReader reader, FacetCountCollector[] facetCountCollectors) {
 if (docIdIndex > 0) {
  ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader());
  DocIDMapperImpl docIDMapper = (DocIDMapperImpl) zoieReader.getDocIDMapper();
  Serializable mapResult = mapReduceStrategy.map(new DefaultIntArray(partialDocIds),
   docIdIndex, zoieReader.getUIDArray(), fieldAccessorFactory.getAccessor(facetInfos, reader,
    docIDMapper), new FacetCountAccessor(facetCountCollectors));
  if (mapResult != null) {
   result.getMapResults().add(mapResult);
  }
 }
 docIdIndex = 0;
}

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

@SuppressWarnings("unchecked")
@Override
public void mapFullIndexReader(BoboSegmentReader reader,
  FacetCountCollector[] facetCountCollectors) {
 ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader());
 DocIDMapperImpl docIDMapper = (DocIDMapperImpl) zoieReader.getDocIDMapper();
 IntArray docArray = fieldAccessorFactory.getDocArray(reader);
 Serializable mapResult = mapReduceStrategy.map(docArray, docArray.size(),
  zoieReader.getUIDArray(), fieldAccessorFactory.getAccessor(facetInfos, reader, docIDMapper),
  new FacetCountAccessor(facetCountCollectors));
 if (mapResult != null) {
  result.getMapResults().add(mapResult);
 }
}

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

@SuppressWarnings("unchecked")
@Override
public final void mapSingleDocument(int docId, BoboSegmentReader reader) {
 if (docIdIndex < BUFFER_SIZE - 1) {
  partialDocIds[docIdIndex++] = docId;
  return;
 }
 if (docIdIndex == BUFFER_SIZE - 1) {
  partialDocIds[docIdIndex++] = docId;
  ZoieSegmentReader<?> zoieReader = (ZoieSegmentReader<?>) (reader.getInnerReader());
  DocIDMapperImpl docIDMapper = (DocIDMapperImpl) zoieReader.getDocIDMapper();
  Serializable mapResult = mapReduceStrategy
    .map(new DefaultIntArray(partialDocIds), BUFFER_SIZE, zoieReader.getUIDArray(),
     fieldAccessorFactory.getAccessor(facetInfos, reader, docIDMapper),
     FacetCountAccessor.EMPTY);
  if (mapResult != null) {
   result.getMapResults().add(mapResult);
  }
  docIdIndex = 0;
 }
}

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

long[] subuidarray = subreaders[i].getUIDArray();
final int start = starts[i]; //start DOCID of this subreader
final ZoieSegmentReader<?> subreader = subreaders[i];
if (mapper == null)
 mapper = new DocIDMapperImpl(subReader.getUIDArray());

代码示例来源: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);
  
}

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