how can i remove the index


李平 <lipin...@...>
 

public class GraphTest {

public static void main(String[] args) throws Exception {

BaseConfiguration baseConfiguration = new BaseConfiguration();
baseConfiguration.setProperty("storage.backend", "hbase");
baseConfiguration.setProperty("storage.hostname", "192.168.1.108");
baseConfiguration.setProperty("gremlin.graph", "org.janusgraph.core.JanusGraphFactory");
JanusGraph janusGraph = JanusGraphFactory.open(baseConfiguration);
GraphTraversalSource g = janusGraph.traversal();
g.tx().rollback();
JanusGraphManagement janusGraphManagement = janusGraph.openManagement();
JanusGraphIndex phoneIndex = janusGraphManagement.getGraphIndex("phoneIndex");
janusGraphManagement.updateIndex(phoneIndex, SchemaAction.DISABLE_INDEX).get();
janusGraphManagement.commit();
g.tx().commit();
ManagementSystem.awaitGraphIndexStatus(janusGraph,"phoneIndex")
.status(SchemaStatus.DISABLED)
.timeout(10, ChronoUnit.MINUTES)
.call();
janusGraphManagement.updateIndex(phoneIndex, SchemaAction.REMOVE_INDEX).get();
janusGraphManagement.commit();
janusGraph.tx().commit();
System.out.println("---------------------remove index sucess...");

the log is :Some key(s) on index phoneIndex do not currently have status DISABLED: phone=INSTALLED


Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.