Re: [Neo4j] REST API delete all nodes. relationships & indexes

67 views
Skip to first unread message

Michael Hunger

unread,
Jul 18, 2012, 9:44:35 AM7/18/12
to ne...@googlegroups.com
Ser neo4j.org/resources/cypher there is a query on the last pages
Might need to add

Where id(n) <> 0

Sent from mobile device

Am 18.07.2012 um 12:58 schrieb Aidan Casey <aidan...@gmail.com>:

> I'm running Neo4J on Heroku - connecting through the REST API (node,js) client.
> Looking for a way to delete everything except node 0 through the REST API - the database isn't large - approx 20,000 nodes
> Is this possible - preferably through a cypher query ?
>
> thanks
>

Jim Webber

unread,
Jul 23, 2012, 10:02:49 AM7/23/12
to ne...@googlegroups.com
Hello mate,

> I'm running Neo4J on Heroku - connecting through the REST API (node,js) client.
> Looking for a way to delete everything except node 0 through the REST API - the database isn't large - approx 20,000 nodes
> Is this possible - preferably through a cypher query ?

Nuke Node 0! It's semantic noise from a time where we mistakenly believed users would need a starting node to get them going.

Jim

Alan Robertson

unread,
Jul 23, 2012, 10:47:00 AM7/23/12
to ne...@googlegroups.com
I held your opinion, but for debugging, I added some IS_A relationships
off nodes coming from node 0. It's worked out nicely in the neo4j_shell
for debugging my code. You might think of it as being the base object
class, and the others as subclasses, then then instances of the
subclasses [Or you might hurl given that sloppy description].

I don't use it for anything but debugging, but it's been handy for
that... There might be better methods, but that one's really simple.

It probably slows down my code - since every node has an IS_A
relationship now - that I only use for debugging. But for the moment,
it's probably not the first thing to optimize out ;-).


--
Alan Robertson <al...@unix.sh> - @OSSAlanR

"Openness is the foundation and preservative of friendship... Let me claim from you at all times your undisguised opinions." - William Wilberforce
Reply all
Reply to author
Forward
0 new messages