如何将禁用的混合索引更新为启用?
How to update a disabled mixed index to enabled?
现在我有一个混合索引,它的状态是禁用的,如下所示:
gremlin> m.getGraphIndex('singleProperty_mixedIndex').getIndexStatus(m.getPropertyKey('prop1'))
==>DISABLED
现在我想将此索引的状态更新为启用,我该怎么做?
我已经尝试过几次使用这些 gremlin,但它不起作用:
m = graph.openManagement();
i = m.getGraphIndex('singleProperty_mixedIndex');
m.updateIndex(i, SchemaAction.REGISTER_INDEX);
m.awaitGraphIndexStatus(graph, 'singleProperty_mixedIndex').status(SchemaStatus.INSTALLED).call();
m.commit();
m=graph.openManagement();
感谢您的帮助!
目前,无法重新启用 JanusGraph 中禁用的索引。禁用索引是删除它之前的最后一步 (wiki reference)。您的选择是:
- 删除索引,然后重新创建它
- 创建一个名称不同但属性相同的索引
现在我有一个混合索引,它的状态是禁用的,如下所示:
gremlin> m.getGraphIndex('singleProperty_mixedIndex').getIndexStatus(m.getPropertyKey('prop1'))
==>DISABLED
现在我想将此索引的状态更新为启用,我该怎么做?
我已经尝试过几次使用这些 gremlin,但它不起作用:
m = graph.openManagement();
i = m.getGraphIndex('singleProperty_mixedIndex');
m.updateIndex(i, SchemaAction.REGISTER_INDEX);
m.awaitGraphIndexStatus(graph, 'singleProperty_mixedIndex').status(SchemaStatus.INSTALLED).call();
m.commit();
m=graph.openManagement();
感谢您的帮助!
目前,无法重新启用 JanusGraph 中禁用的索引。禁用索引是删除它之前的最后一步 (wiki reference)。您的选择是:
- 删除索引,然后重新创建它
- 创建一个名称不同但属性相同的索引