Thanks. That was what I imagined too. However, I have a test that does:

1. create two nodes (e.g. node 2 and node 3)
2. create a relationship between the two nodes (e.g. rel id 23, type :foo)
3. add the relationship to the foo_rels index, with 2 as the key, 3 as the 
value (the node ids) on rel id 23.
(In REST it's a POST to /index/relationship/foo_rels/2/3 with the URI of the 
relationship 23 as the body)
4. look up the relationship from the index, returned expected result (GET to 
/index/relationship/foo_rels/2/3).
5. delete the relationship (id 23) (a DELETE to /relationship/23)
6. look up the relationship from the index again (GET to 
/index/relationship/foo_rels/2/3), returned empty results ([]).

The result of the test confused me. It appears that the relationship was also 
removed from the index (as step 6 returned empty array) when it was deleted.

Any insights?




On Sep 6, 2011, at 7:05 PM, Linan Wang wrote:

> as far as i know, no. you need to do it yourself.
> hint: http://docs.neo4j.org/chunked/1.4.1/indexing-update.html
> 
> On Wed, Sep 7, 2011 at 1:25 AM, Nuo Yan <yan....@gmail.com> wrote:
>> Hey guys,
>> 
>> When a relationship gets deleted, will it be removed from the index
>> automatically? My test shows yes, but I want to be absolutely certain.
>> 
>> For example, a relationship :foo exists between node A and B and it's
>> indexed on the foo_rels index with key node_a's id and value node_b's id.
>> When I delete this relationship, do I also have to manually remove it from
>> the index (i.e. a DELETE to /index/relationship/foo_rels/15/23/100 where 15
>> is the key, 23 is the value, 100 is the relationship id)?
>> _______________________________________________
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> 
> 
> 
> -- 
> Best regards
> 
> Linan Wang
> _______________________________________________
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to