Reputation: 81
Is there anyway to delete an unused Label
via the java API?
Apparently, unused Labels are not automatically deleted.
The javadoc for org.neo4j.tooling.GlobalGraphOperations.getAllLabels()
says:
However, it may also return more than that (e.g. it can return "historic" labels that are no longer used).
For example, if you create an Index
and then drop it, the Label
remains.
Upvotes: 1
Views: 309
Reputation: 41706
I create a tool that has a store-copy functionality and does what Stefan said.
You can also skip properties or relationships with it:
https://github.com/jexp/store-utils/tree/20#store-copy
Upvotes: 0
Reputation: 39925
Currently there is no clean way to delete unused labels.
Of course you can use batch inserter API to create a duplicate of your datastore. This duplicate will not have the unused labels any more. See http://docs.neo4j.org/chunked/stable/batchinsert.html for details.
Upvotes: 2