Hi im getting the following error when trying to create an index using 
orient db with grails via tinkerpop api:

com.orientechnologies.orient.core.index.OIndexException: Index with name 
__@recordmap@___idx-myindex already exists.

I have a method which I call first to drop the indexes:

 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()

And then a method which I call after to create the index:

 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()

Im using orient db 2.1.16, and this problem is only arising now after 
upgrading from 1.6.6.

Also when i list the indexes in the embedded graph I can see there are two 
indexes

1) __@recordmap@___myindex

2) myindex

Why are there two indexes in the graph db?

Thanks

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to