假设2个节点之间存在如下关系
start --> "follows" --> end
我想创建一个名为“Relations”的索引并将上述关系添加到索引中。我如何在 Scala 或 Java 中做到这一点?
我试过这样做:
override def NodeIndexConfig = ("Relations", Some(Map("provider" -> "lucene", "type" -> "fulltext")))::NIL
val rel_name = group+"_Voteup"
val relation = user_node --> rel_name --> item_node
val Relation_Index = getNodeIndex("Relations").get
val rel_value = user_id+item_id+rel_name
Relation_Index += (relation,"rel_id",rel_value)
但是,我收到类型不匹配错误。