本文整理汇总了Java中com.orientechnologies.orient.core.index.OIndex.getMetadata方法的典型用法代码示例。如果您正苦于以下问题:Java OIndex.getMetadata方法的具体用法?Java OIndex.getMetadata怎么用?Java OIndex.getMetadata使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.orientechnologies.orient.core.index.OIndex
的用法示例。
在下文中一共展示了OIndex.getMetadata方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInstance
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
@Override
protected OIndex<?> createInstance(OIndex proxy) {
OSchema schema = OrientDbWebSession.get().getDatabase().getMetadata().getSchema();
OClass oClass = schema.getClass(proxy.getDefinition().getClassName());
String name = proxy.getName();
List<String> fields = proxy.getDefinition().getFields();
String type = proxy.getType();
if(name==null) name=oClass.getName()+"."+fields.get(0);
ODocument metadata = proxy.getMetadata();
String algorithm = proxy.getAlgorithm();
values.keySet().retainAll(RW_ATTRS);
return oClass.createIndex(name, type, null, metadata, algorithm, fields.toArray(new String[0]));
}
示例2: getAnalyzer
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
private String getAnalyzer(final OIndex classIndex) {
// analyzer is stored only in metadata and there is no way to get default analyzer.. just assume it
final ODocument metadata = classIndex.getMetadata();
final String analyzer = metadata != null ? metadata.<String>field(ANALYZER) : null;
return MoreObjects.firstNonNull(analyzer, StandardAnalyzer.class.getName());
}
示例3: getAnalyzer
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
private String getAnalyzer(final OIndex classIndex) {
// analyzer is stored only in metadata and there is no way to get default analyzer.. just assume it
final ODocument metadata = classIndex.getMetadata();
final String analyzer = metadata != null ? metadata.<String>field(LuceneIndexFieldExtension.ANALYZER) : null;
return MoreObjects.firstNonNull(analyzer, StandardAnalyzer.class.getName());
}