0

I used spatial features of Neo4j. I faced following problem in that. I used Node API to create a node and add that node to Spatial Layer.

Que 1 :- In Neo4j Browser client when i retrive all node it shows me two node with same node no. (One is real node and other is added to spatial layer). I think second node is for indexing purpose. Need clerification on this. I am wrong or it's bug or it's normal behaviour.

Que 2 :- If I update latitude and longitude of real node then second node in spatial layer is not updated with new value of co-ordinates. How can i update both node?

Any Help will be very helpful for me.

Thanks.

Raj
  • 252
  • 1
  • 5
  • 20

2 Answers2

0
  1. Neo4j spatial adds a second node within the geo R-Tree that represents the location of your domain node.

  2. You have to remove it from the index and re-add it again.

Michael Hunger
  • 41,339
  • 3
  • 57
  • 80
  • Thanks @Michael. I am not able to remove node from index. I used following API to delete node from index. But after this API also node is still in Spatial Layer. http://localhost:7474/db/data/index/node/kvnode/kvkey2/90 Can I delete complete layer and recreate it. But according to following link deleting complete layer is still not implemented. http://comments.gmane.org/gmane.comp.db.neo4j.user/20461 Please guide me in proper direction. – Raj May 21 '14 at 06:18
0
  1. As @Michael pointed correctly, it's a normal behavior as it's a representation of location of your node.

  2. To remove a node from an index, you can delete the node, using "internal" id of the indexed node. Please check my answer here, for the detailed steps on how to do that. After that you can easily re-add the node to index.

Community
  • 1
  • 1
Mit Bhatt
  • 472
  • 2
  • 11