janusgraph重建索引时报异常Update action [REINDEX] cannot be invoked for index with status [INSTALLED]

背景

因为有批数据先插入了,但忘了建索引了,于是,再建索引后,重新索引数据,不过执行时报异常:
Exception in thread "main" java.lang.IllegalArgumentException: Update action [REINDEX] cannot be invoked for index with status [INSTALLED]

代码

JanusGraphManagement mgmt = standardGraphFactory.openManagement();
JanusGraphIndex edge_object_key_20200224 = mgmt.getGraphIndex(indexName);
mgmt.updateIndex(edge_object_key_20200224, SchemaAction.REINDEX).get();
mgmt.commit();

异常

Exception in thread "main" java.lang.IllegalArgumentException: Update action [REINDEX] cannot be invoked for index with status [INSTALLED]
	at org.janusgraph.core.schema.SchemaAction.isApplicableStatus(SchemaAction.java:79)
	at org.janusgraph.graphdb.database.management.ManagementSystem.updateIndex(ManagementSystem.java:795)
	at cn.haizhi.bigdata.graph.task.DataFactoryTask.reIndexEdge(DataFactoryTask.java:71)
	at cn.haizhi.bigdata.graph.task.DataFactoryTask.main(DataFactoryTask.java:59)

解决方案

(待补充)

你可能感兴趣的:(图计算,JanusGraph,异常)