简体   繁体   English

在neo4j 1.8中添加标签

[英]Add label in neo4j 1.8

I had created a GraphDatabaseService and created a node. 我创建了一个GraphDatabaseService并创建了一个节点。

org.neo4j.graphdb.GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);

org.neo4j.graphdb.Node customer=graphDb.createNode();

Now I require to add a label to the node to identify that the node as customer. 现在,我需要在节点上添加标签,以将该节点标识为客户。

Could anyone please guide me? 有人可以指导我吗?

Neo4j Labels are not supported for Neo4j 1.x. Neo4j 1.x不支持Neo4j标签。 They were introduced in Neo4j 2. 它们是在Neo4j 2中引入的。

For more info, check out 有关更多信息,请查看

Therefore, what you are asking is not possible without upgrading to Neo4j 2.x. 因此,如果不升级到Neo4j 2.x,您的要求是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM