简体   繁体   中英

py2neo Listing all nodes in DB

I'm trying to list all nodes from an index in my neo4j database. The following code works however it only prints out about 600 nodes when I have over 10K in the index. I suspect I'm using the wrong the method. Any help is appreciated.

myindex = graph_db.get_or_create_index(neo4j.Node, "nodeID")
allnodes = myindex.query("nodeID:*")
for i in allnodes:
    value1 = "{0}".format(i['nodeID'])
    print value1

I can't see any reason why that wouldn't work based on what you've posted here. Perhaps you're hitting some kind of limit I haven't yet encountered. Do you have any log output you can post?

If you want to get in touch privately (via email), and are willing to share your source database, I can try to help you solve this particular case and see if a more general issue can be identified.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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