Java 类org.apache.lucene.index.SingletonSortedSetDocValues 实例源码

项目:NYBC    文件:FieldCacheImpl.java   
public SortedSetDocValues getDocTermOrds(AtomicReader reader, String field) throws IOException {
  SortedSetDocValues dv = reader.getSortedSetDocValues(field);
  if (dv != null) {
    return dv;
  }

  SortedDocValues sdv = reader.getSortedDocValues(field);
  if (sdv != null) {
    return new SingletonSortedSetDocValues(sdv);
  }

  final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
  if (info == null) {
    return SortedSetDocValues.EMPTY;
  } else if (info.hasDocValues()) {
    throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType());
  } else if (!info.isIndexed()) {
    return SortedSetDocValues.EMPTY;
  }

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
public SortedSetDocValues getDocTermOrds(AtomicReader reader, String field) throws IOException {
  SortedSetDocValues dv = reader.getSortedSetDocValues(field);
  if (dv != null) {
    return dv;
  }

  SortedDocValues sdv = reader.getSortedDocValues(field);
  if (sdv != null) {
    return new SingletonSortedSetDocValues(sdv);
  }

  final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
  if (info == null) {
    return SortedSetDocValues.EMPTY;
  } else if (info.hasDocValues()) {
    throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType());
  } else if (!info.isIndexed()) {
    return SortedSetDocValues.EMPTY;
  }

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
public SortedSetDocValues getDocTermOrds(AtomicReader reader, String field) throws IOException {
  SortedSetDocValues dv = reader.getSortedSetDocValues(field);
  if (dv != null) {
    return dv;
  }

  SortedDocValues sdv = reader.getSortedDocValues(field);
  if (sdv != null) {
    return new SingletonSortedSetDocValues(sdv);
  }

  final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
  if (info == null) {
    return SortedSetDocValues.EMPTY;
  } else if (info.hasDocValues()) {
    throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType());
  } else if (!info.isIndexed()) {
    return SortedSetDocValues.EMPTY;
  }

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}
项目:Maskana-Gestor-de-Conocimiento    文件:FieldCacheImpl.java   
public SortedSetDocValues getDocTermOrds(AtomicReader reader, String field) throws IOException {
  SortedSetDocValues dv = reader.getSortedSetDocValues(field);
  if (dv != null) {
    return dv;
  }

  SortedDocValues sdv = reader.getSortedDocValues(field);
  if (sdv != null) {
    return new SingletonSortedSetDocValues(sdv);
  }

  final FieldInfo info = reader.getFieldInfos().fieldInfo(field);
  if (info == null) {
    return SortedSetDocValues.EMPTY;
  } else if (info.hasDocValues()) {
    throw new IllegalStateException("Type mismatch: " + field + " was indexed as " + info.getDocValuesType());
  } else if (!info.isIndexed()) {
    return SortedSetDocValues.EMPTY;
  }

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}