Java 使用cypher获取带有标签和索引的节点

Java 使用cypher获取带有标签和索引的节点,java,neo4j,cypher,Java,Neo4j,Cypher,我想使用cypher查询使用label和index获取节点及其信息,但在CypherQuery()方法中,变量“result”中仍然得到空值 NewCypherQuery.java(bean) index.jsp <form method="post" action="InsertNodes"> <input type="text" name="txtname" value="Hello World !!!!!"></input> <input type

我想使用cypher查询使用label和index获取节点及其信息,但在CypherQuery()方法中,变量“result”中仍然得到空值

NewCypherQuery.java(bean)

index.jsp

<form method="post" action="InsertNodes">
<input type="text" name="txtname" value="Hello World !!!!!"></input>
<input type="submit" value="Neo4j World"></input>
</form>

您尚未真正定义两个标签amd(inxamd)和pri(inxpri)的值,也未将它们分配给创建的任何节点

您可以实现Label类并为标签(如“inxamd”)指定名称,也可以使用。 然后,使用将标签指定给节点

amad.addLabel(thelabel);
与上述问题无关,标签名称通常是一个描述性字符串,指示节点所属的集合,例如人、狗 在大多数情况下,您不需要显式地提供索引提示()

<form method="post" action="InsertNodes">
<input type="text" name="txtname" value="Hello World !!!!!"></input>
<input type="submit" value="Neo4j World"></input>
</form>
amad.addLabel(thelabel);