当前位置: 首页>>代码示例>>Java>>正文


Java OIndex.getInternal方法代码示例

本文整理汇总了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;
  }
 
开发者ID:orientechnologies,项目名称:orientdb-spatial,代码行数:17,代码来源:OSpatialFunctionAbstract.java

示例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;
}
 
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:18,代码来源:OLuceneTextOperator.java

示例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);
  }
}
 
开发者ID:orientechnologies,项目名称:orientdb-spatial,代码行数:16,代码来源:OLuceneSpatialIndexFactory.java

示例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();
    }
  }
}
 
开发者ID:orientechnologies,项目名称:orientdb-spatial,代码行数:11,代码来源:OLuceneSpatialIndexPlugin.java

示例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();
    }
  }
}
 
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:11,代码来源:OLuceneIndexPlugin.java

示例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);
          }
        }
      }
    }
  }

}
 
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:30,代码来源:OLuceneClassIndexManager.java

示例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);
  }
}
 
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:15,代码来源:OLuceneIndexFactory.java

示例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();
    }
  }
 
开发者ID:orientechnologies,项目名称:orientdb-lucene,代码行数:15,代码来源:LuceneGetSearcherTest.java


注:本文中的com.orientechnologies.orient.core.index.OIndex.getInternal方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。