Java 类org.apache.lucene.index.FieldInfos.FieldNumbers 实例源码

项目:lams    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:search    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:NYBC    文件:DocumentsWriterPerThreadPool.java   
void initialize(DocumentsWriter documentsWriter, FieldNumbers globalFieldMap, LiveIndexWriterConfig config) {
  this.documentsWriter.set(documentsWriter); // thread pool is bound to DW
  this.globalFieldMap.set(globalFieldMap);
  for (int i = 0; i < threadStates.length; i++) {
    final FieldInfos.Builder infos = new FieldInfos.Builder(globalFieldMap);
    threadStates[i] = new ThreadState(new DocumentsWriterPerThread(documentsWriter.directory, documentsWriter, infos, documentsWriter.chain));
  }
}
项目:NYBC    文件:DocumentsWriter.java   
DocumentsWriter(Codec codec, LiveIndexWriterConfig config, Directory directory, IndexWriter writer, FieldNumbers globalFieldNumbers,
    BufferedDeletesStream bufferedDeletesStream) {
  this.codec = codec;
  this.directory = directory;
  this.indexWriter = writer;
  this.infoStream = config.getInfoStream();
  this.similarity = config.getSimilarity();
  this.perThreadPool = config.getIndexerThreadPool();
  this.chain = config.getIndexingChain();
  this.perThreadPool.initialize(this, globalFieldNumbers, config);
  flushPolicy = config.getFlushPolicy();
  assert flushPolicy != null;
  flushPolicy.init(this);
  flushControl = new DocumentsWriterFlushControl(this, config);
}
项目:NYBC    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentInfoPerCommit info : segmentInfos) {
    for(FieldInfo fi : getFieldInfos(info.info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:read-open-source-code    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:read-open-source-code    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:read-open-source-code    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}
项目:Maskana-Gestor-de-Conocimiento    文件:IndexWriter.java   
/**
 * Loads or returns the already loaded the global field number map for this {@link SegmentInfos}.
 * If this {@link SegmentInfos} has no global field number map the returned instance is empty
 */
private FieldNumbers getFieldNumberMap() throws IOException {
  final FieldNumbers map = new FieldNumbers();

  for(SegmentCommitInfo info : segmentInfos) {
    for(FieldInfo fi : SegmentReader.readFieldInfos(info)) {
      map.addOrGet(fi.name, fi.number, fi.getDocValuesType());
    }
  }

  return map;
}