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

项目:lams    文件: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 DocValues.singleton(sdv);
  }

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

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}
项目:search    文件: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 DocValues.singleton(sdv);
  }

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

  DocTermOrds dto = (DocTermOrds) caches.get(DocTermOrds.class).get(reader, new CacheKey(field, null), false);
  return dto.iterator(reader);
}
项目: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);
}
项目: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 DocValues.singleton(sdv);
  }

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

  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);
}
项目:lams    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:search    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:search    文件:TestFaceting.java   
@Test
public void testTermEnum() throws Exception {
  doTermEnum(0);
  doTermEnum(1);
  final int DEFAULT_INDEX_INTERVAL = 1 << DocTermOrds.DEFAULT_INDEX_INTERVAL_BITS;
  doTermEnum(DEFAULT_INDEX_INTERVAL - 1);  // test boundaries around the block size
  doTermEnum(DEFAULT_INDEX_INTERVAL);
  doTermEnum(DEFAULT_INDEX_INTERVAL + 1);
  doTermEnum(DEFAULT_INDEX_INTERVAL * 2 + 2);    
  // doTermEnum(DEFAULT_INDEX_INTERVAL * 3 + 3);    
}
项目:NYBC    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<Class<?>,Cache>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:NYBC    文件:TestFaceting.java   
@Test
public void testTermEnum() throws Exception {
  doTermEnum(0);
  doTermEnum(1);
  final int DEFAULT_INDEX_INTERVAL = 1 << DocTermOrds.DEFAULT_INDEX_INTERVAL_BITS;
  doTermEnum(DEFAULT_INDEX_INTERVAL - 1);  // test boundaries around the block size
  doTermEnum(DEFAULT_INDEX_INTERVAL);
  doTermEnum(DEFAULT_INDEX_INTERVAL + 1);
  doTermEnum(DEFAULT_INDEX_INTERVAL * 2 + 2);    
  // doTermEnum(DEFAULT_INDEX_INTERVAL * 3 + 3);    
}
项目:search-core    文件:TestFaceting.java   
@Test
public void testTermEnum() throws Exception {
  doTermEnum(0);
  doTermEnum(1);
  final int DEFAULT_INDEX_INTERVAL = 1 << DocTermOrds.DEFAULT_INDEX_INTERVAL_BITS;
  doTermEnum(DEFAULT_INDEX_INTERVAL - 1);  // test boundaries around the block size
  doTermEnum(DEFAULT_INDEX_INTERVAL);
  doTermEnum(DEFAULT_INDEX_INTERVAL + 1);
  doTermEnum(DEFAULT_INDEX_INTERVAL * 2 + 2);    
  // doTermEnum(DEFAULT_INDEX_INTERVAL * 3 + 3);    
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<Class<?>,Cache>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<Class<?>,Cache>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:Maskana-Gestor-de-Conocimiento    文件:FieldCacheImpl.java   
private synchronized void init() {
  caches = new HashMap<Class<?>,Cache>(9);
  caches.put(Byte.TYPE, new ByteCache(this));
  caches.put(Short.TYPE, new ShortCache(this));
  caches.put(Integer.TYPE, new IntCache(this));
  caches.put(Float.TYPE, new FloatCache(this));
  caches.put(Long.TYPE, new LongCache(this));
  caches.put(Double.TYPE, new DoubleCache(this));
  caches.put(BinaryDocValues.class, new BinaryDocValuesCache(this));
  caches.put(SortedDocValues.class, new SortedDocValuesCache(this));
  caches.put(DocTermOrds.class, new DocTermOrdsCache(this));
  caches.put(DocsWithFieldCache.class, new DocsWithFieldCache(this));
}
项目:lams    文件:FieldCacheImpl.java   
@Override
protected Accountable createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:search    文件:FieldCacheImpl.java   
@Override
protected Accountable createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:NYBC    文件:FieldCacheImpl.java   
@Override
protected Object createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
@Override
protected Object createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
@Override
protected Object createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:read-open-source-code    文件:FieldCacheImpl.java   
@Override
protected Accountable createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}
项目:Maskana-Gestor-de-Conocimiento    文件:FieldCacheImpl.java   
@Override
protected Object createValue(AtomicReader reader, CacheKey key, boolean setDocsWithField /* ignored */)
    throws IOException {
  return new DocTermOrds(reader, null, key.field);
}