我是一个python + neo4j noob.尝试使用我的python flask web应用程序中的py2neo访问graphenedb上的数据.
我花了好几个小时试着做一些简单的事.我想要做的就是根据db的属性从db获取一个节点.
尝试以下内容但它返回一个空数组到客户端:
niagara = neo4j.GraphDatabaseService(<my graphenedb url>)
people = niagara.get_or_create_index(neo4j.Node, "People")
results = people.get("alias","BigDog")
return json.dumps(results)
Run Code Online (Sandbox Code Playgroud)
我唯一能够完整地返回节点的时候是我通过它的id访问它:
return json.dumps(niagara.get_properties(niagara.node(0)))
Run Code Online (Sandbox Code Playgroud)
任何帮助都会很棒.