混合索引算法java_添加现有属性后,无法重新编制titan 1.0.0混合索引

我使用 Titan 1.0.0 与cassandra后端和elasticsearch作为索引 . 我有用户顶点配置属性(userId,email,fullName等) . 其中一些属性在elasticsearch中配置为混合索引 . 现在我想使用以下方法将现有属性(例如,之前未包含在混合索引中的 previously configured 属性)添加到混合索引:

TitanManagement tm = graph.openManagement();

tm.addIndexKey(tm.getGraphIndex("users"), tm.getPropertyKey("age"));

tm.commit();

从现在开始,将额外的“age " property mapping is added to the elasticsearch. Each update of the " age " property of a user vertex add an " age”字段添加到elasticserch文档中 . 但是,为了在titan查询中正确使用此索引,我必须重新索引我的混合图索引 . 此时我的问题就出现了 . 提到titan文档,我需要执行以下步骤(使用Gremlin):

import com.thinkaurelius.titan.graphdb.database.management.ManagementSystem

// Rollback or commit transactions on the graph which predate the index definition

graph.tx().rollback()

// Block until the SchemaStatus transitions from INSTALLED to REGISTERED

ManagementSystem.awaitGraphIndexStatus(graph, "users")

.status(SchemaStatus.REGISTERED)

.timeout(10, ChronoUnit.MINUTES) // set timeout to 10

.call()

超时10分钟后收到的答案:

==>GraphIndexStatusReport[success=false, indexName='users', targetStatus=REGISTERED,

notConverged={age=INSTALLED, fullName=ENABLED, userId=ENABLED,

userRegisterDate=ENABLED, userGender=ENABLED, email=ENABLED},

converged={}, elapsed=PT10M0.173S]

现在,如果我尝试重新索引如下:

tm = graph.openManagement()

tm.updateIndex(tm.getGraphIndex("users"), SchemaAction.REINDEX).get()

tm.commit()

我收到错误:

WARN com.thinkaurelius.titan.graphdb.olap.job.IndexRepairJob - Index users has key age in an invalid status INSTALLED

ERROR com.thinkaurelius.titan.diskstorage.keycolumnvalue.scan.StandardScannerExecutor - Exception trying to setup the job:

com.thinkaurelius.titan.core.TitanException: The index users is in an invalid state and cannot be indexed. The following index keys have invalid status: age has status INSTALLED (status must be one of [REGISTERED, ENABLED])

我有什么想法我做错了吗?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值