本文整理汇总了Java中org.elasticsearch.index.fielddata.AtomicFieldData类的典型用法代码示例。如果您正苦于以下问题:Java AtomicFieldData类的具体用法?Java AtomicFieldData怎么用?Java AtomicFieldData使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AtomicFieldData类属于org.elasticsearch.index.fielddata包,在下文中一共展示了AtomicFieldData类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import org.elasticsearch.index.fielddata.AtomicFieldData; //导入依赖的package包/类
@Override
public AtomicFieldData load(LeafReaderContext context) {
return new AtomicFieldData() {
@Override
public ScriptDocValues getScriptValues() {
throw new UnsupportedOperationException(UNSUPPORTED);
}
@Override
public SortedBinaryDocValues getBytesValues() {
return new SortedBinaryDocValues() {
@Override
public void setDocument(int docId) {
}
@Override
public int count() {
return 1;
}
@Override
public BytesRef valueAt(int index) {
return new BytesRef("0");
}
};
}
@Override
public long ramBytesUsed() {
throw new UnsupportedOperationException(UNSUPPORTED);
}
@Override
public Collection<Accountable> getChildResources() {
throw new UnsupportedOperationException(UNSUPPORTED);
}
@Override
public void close() {
}
};
}
示例2: loadDirect
import org.elasticsearch.index.fielddata.AtomicFieldData; //导入依赖的package包/类
@Override
public AtomicFieldData loadDirect(LeafReaderContext context) throws Exception {
throw new UnsupportedOperationException(UNSUPPORTED);
}