本文整理汇总了Java中com.orientechnologies.orient.core.index.OIndex.getInternal方法的典型用法代码示例。如果您正苦于以下问题:Java OIndex.getInternal方法的具体用法?Java OIndex.getInternal怎么用?Java OIndex.getInternal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.orientechnologies.orient.core.index.OIndex
的用法示例。
在下文中一共展示了OIndex.getInternal方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: searchForIndex
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
protected OIndex searchForIndex(OFromClause target, OExpression[] args) {
// TODO Check if target is a class otherwise exception
OFromItem item = target.getItem();
OBaseIdentifier identifier = item.getIdentifier();
String fieldName = args[0].toString();
Set<OIndex<?>> indexes = getDb().getMetadata().getIndexManager().getClassInvolvedIndexes(identifier.toString(), fieldName);
for (OIndex<?> index : indexes) {
if (index.getInternal() instanceof OLuceneSpatialIndex) {
return index;
}
}
return null;
}
示例2: involvedIndex
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
protected OLuceneFullTextIndex involvedIndex(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition,
Object iLeft, Object iRight) {
ODocument doc = iRecord.getRecord();
Set<OIndex<?>> classInvolvedIndexes = getDatabase().getMetadata().getIndexManager()
.getClassInvolvedIndexes(doc.getClassName(), fields(iCondition));
OLuceneFullTextIndex idx = null;
for (OIndex<?> classInvolvedIndex : classInvolvedIndexes) {
if (classInvolvedIndex.getInternal() instanceof OLuceneFullTextIndex) {
idx = (OLuceneFullTextIndex) classInvolvedIndex.getInternal();
break;
}
}
return idx;
}
示例3: onDrop
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
@Override
public void onDrop(final ODatabaseInternal iDatabase) {
try {
OLogManager.instance().debug(this, "Dropping spatial indexes...");
for (OIndex idx : iDatabase.getMetadata().getIndexManager().getIndexes()) {
if (idx.getInternal() instanceof OLuceneSpatialIndex) {
OLogManager.instance().debug(this, "- index '%s'", idx.getName());
idx.delete();
}
}
} catch (Exception e) {
OLogManager.instance().warn(this, "Error on dropping spatial indexes", e);
}
}
示例4: onDrop
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
@Override
public void onDrop(final ODatabaseInternal iDatabase) {
OLogManager.instance().info(this, "Dropping spatial indexes...");
for (OIndex idx : iDatabase.getMetadata().getIndexManager().getIndexes()) {
if (idx.getInternal() instanceof OLuceneSpatialIndex) {
OLogManager.instance().info(this, "- index '%s'", idx.getName());
idx.delete();
}
}
}
示例5: onDrop
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
@Override
public void onDrop(final ODatabaseInternal iDatabase) {
OLogManager.instance().info(this, "Dropping Lucene indexes...");
for (OIndex idx : iDatabase.getMetadata().getIndexManager().getIndexes()) {
if (idx.getInternal() instanceof OLuceneIndex) {
OLogManager.instance().info(this, "- index '%s'", idx.getName());
idx.delete();
}
}
}
示例6: updateIndexEntries
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
private void updateIndexEntries(ODocument iDocument) {
iDocument = checkForLoading(iDocument);
final OClass cls = iDocument.getSchemaClass();
if (cls == null)
return;
final Collection<OIndex<?>> indexes = (Collection<OIndex<?>>) getDatabase().getMetadata().getIndexManager().getIndexes();
if (!indexes.isEmpty()) {
final Set<String> dirtyFields = new HashSet<String>(Arrays.asList(iDocument.getDirtyFields()));
if (!dirtyFields.isEmpty()) {
for (final OIndex<?> index : indexes) {
if (index.getInternal() instanceof OLuceneIndex && index.getConfiguration().field("metadata") != null) {
if (index.getDefinition() instanceof OCompositeIndexDefinition)
processCompositeIndexUpdate(index, dirtyFields, iDocument);
else
processSingleIndexUpdate(index, dirtyFields, iDocument);
if (iDocument.isTrackingChanges()) {
iDocument.setTrackingChanges(false);
iDocument.setTrackingChanges(true);
}
}
}
}
}
}
示例7: onDrop
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
@Override
public void onDrop(final ODatabaseInternal iDatabase) {
try {
OLogManager.instance().debug(this, "Dropping Lucene indexes...");
for (OIndex idx : iDatabase.getMetadata().getIndexManager().getIndexes()) {
if (idx.getInternal() instanceof OLuceneIndex) {
OLogManager.instance().debug(this, "- index '%s'", idx.getName());
idx.delete();
}
}
} catch (Exception e) {
OLogManager.instance().warn(this, "Error on dropping Lucene indexes", e);
}
}
示例8: testSearcherInstance
import com.orientechnologies.orient.core.index.OIndex; //导入方法依赖的package包/类
public void testSearcherInstance() {
OIndex<?> index = databaseDocumentTx.getMetadata().getIndexManager().getIndex("Person.isDeleted");
Assert.assertEquals(true, index.getInternal() instanceof OLuceneIndexNotUnique);
OLuceneIndexNotUnique idx = (OLuceneIndexNotUnique) index.getInternal();
try {
Assert.assertNotNull(idx.searcher());
} catch (IOException e) {
e.printStackTrace();
}
}