How to use Java code to delete graph indexes #4326
-
I created a mix index and wanted to use Java code to delete it. I then referred to AA for code writing, but encountered an error when deleting it. Is there a problem with my usage? https://docs.janusgraph.org/schema/index-management/index-removal/ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Can you try if https://docs.janusgraph.org/operations/recovery/#janusgraph-instance-failure works? |
Beta Was this translation helpful? Give feedback.
-
Hi @LiJie20190102! The problem with your usage is that you are re-using the |
Beta Was this translation helpful? Give feedback.
Hi @LiJie20190102!
The problem with your usage is that you are re-using the
graphIndex
object, which you created in a previous transaction. Any reference to an index only remains valid during the lifespan of the enclosing transaction. That's why the example you are following retrieves the index a second time by callingm.getGraphIndex("name")
.