How can I delete a spatial index and all it's data? I have nodes I added to this index, but now I have added it to another spatial index. I no longer need the old index.
Asked
Active
Viewed 190 times
3
-
What calls did you use to create it and add nodes to it? – Jim Biard Jul 30 '14 at 02:44
2 Answers
2
Jey,
There is a REST call that will delete the RTree layer node and the nodes in its graph.
:DELETE /db/data/index/node/{layer name}
Be careful, because if the nodes in the layer graph were added with the REST addNodeToLayer method, they will be deleted as well.
Interestingly, the actual index objects are not deleted. If you do the REST call
:GET /db/data/index/node
both before and after the DELETE call, you will see the same indexes listed.
Grace and peace,
Jim

Jim Biard
- 2,252
- 11
- 14
0
Usually it should be enough just to delete the index via the API and perhaps the layers.
Hmm probably it is easiest to find the rtree-root and write a query / code that traverses it down to the leaf nodes and deletes everything along?

Michael Hunger
- 41,339
- 3
- 57
- 80