【问题标题】:Orient db: cant create indexOrientdb:无法创建索引
【发布时间】:2016-08-23 09:35:28
【问题描述】:

您好,我在尝试通过 tinkerpop api 使用带有 grails 的 orient db 创建索引时遇到以下错误:

com.orientechnologies.orient.core.index.OIndexException:名称为 __@recordmap@___idx-myindex 的索引已存在。

我有一个方法,我首先调用它来删除索引:

 Index<Vertex> theIndex = graph.getIndex(indexName, Vertex.class)
 if (!theIndex) { // The index is always null when searching for idx-myindex
     log.warn "Index ${indexName} does not appear to exist"
     return
 }
 graph.dropIndex(indexName)
 commitTransaction()

然后是我调用的方法来创建索引:

 Index<Vertex> theIndex = graph.getIndex(indexName, Vertex.class)
 if (theIndex) { //index is always null when searching for idx-myindex
     log.warn "Index ${indexName} already exists"
     return
 }
 graph.createIndex(indexName, Vertex.class) //throws the error
 commitTransaction()

我使用的是orient db 2.1.16,这个问题是从1.6.6升级到现在才出现的。

当我在嵌入图表中列出索引时,我可以看到有两个索引

1) __@recordmap@___myindex

2) 我的索引

为什么图db中有两个索引?

谢谢

【问题讨论】:

    标签: grails indexing orientdb graph-databases tinkerpop


    【解决方案1】:

    目前我的工作是专门删除带有记录映射的索引,直到这个问题得到解决:

    https://github.com/orientechnologies/orientdb/issues/4730

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-27
      • 2015-03-03
      • 2019-12-04
      相关资源
      最近更新 更多