[Neo4j] Does removing a node/relationship automatically remove it from all indices?

Rick Bullotta rick.bullotta at burningskysoftware.com
Wed Oct 27 15:48:46 CEST 2010


As long as you call indexService.removeIndex(node,key), it will work OK,
correct?


-----Original Message-----
From: user-bounces at lists.neo4j.org [mailto:user-bounces at lists.neo4j.org] On
Behalf Of Mattias Persson
Sent: Wednesday, October 27, 2010 4:14 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Does removing a node/relationship automatically remove
it from all indices?

No, it doesn't automatically get deleted. But a remedy for that could be to
add a Index#remove( T entity ) method (which I plan to add) and have a
TransactionEventHandler which listens for deleted nodes/relationships and
calls that method on all indices... it could however be quite slow if you
have many indexes.

The implementation is currently that if you "forget" to remove it from the
index it will be filtered out of the query result silently... but over time
that list of dead entities could grow, if the index couldn't somehow
self-heal, which it definately could... well a lot could be done there.

2010/10/27 Marko Rodriguez <okrammarko at gmail.com>

> Hello,
>
> Does removing a node/relationship automatically remove it from all
indices?
>
> Meaning: If I node.delete(), am I certain that its not longer indexed in
> any indices that it was indexed in.
>
> Thank you,
> Marko.
>
> http://markorodriguez.com
> _______________________________________________
> Neo4j mailing list
> User at lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [mattias at neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
User at lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user



More information about the User mailing list