Neo4j - How to delete unused property keys from br

2019-01-22 13:32发布

I've deleted all my nodes and relationships (Delete all nodes and relationships in neo4j 1.8), but I see that in Neo4j Browser the "property keys" that existed before the deletion remain.

See the picture below:

enter image description here

How can I make all the "Property Keys" go away too, so I can end up with a fresh new database? I understand this orphan property keys do not pose a problem themselves, but they clutter the browser experience and will start confusing with newer properties.

Thanks!

标签: neo4j nosql
5条回答
我想做一个坏孩纸
2楼-- · 2019-01-22 14:09

In the manual you can see that there is currently no way to disentangle which property keys are currently used without traversing the graph.

http://neo4j.com/docs/stable/rest-api-property-values.html#_property_keys

Which is a bummer because I'd like to do the same thing. TBC.

查看更多
▲ chillily
3楼-- · 2019-01-22 14:11

What version of Neo4j are you using? Prior to to version 2.3 there is a file named keystore in the data/ directory that was used to populate this in the browser. Deleting this file will clear out the Labels, Relationship Types, and Property Keys listed in the browser.

Looks like this has changed now with Neo4j 2.3 so if you are using the latest version I don't think you'll have this file.

查看更多
何必那么认真
4楼-- · 2019-01-22 14:22

You should be able to clear everything out by:

  • stopping your Neo4j database
  • deleting everything matching data/graph.db/* (look inside the graph.db folder)
  • starting up again.
查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-01-22 14:22

I have Neo4j Community Edition 3.2. To get rid of the property keys (and get rid of the entire DB), I completely uninstalled Neo4j, deleted the Neo4j folder in C:\Program Files and then reinstalled the package again so that I had a fresh DB to work with. Not ideal to delete everything but it worked for me.

查看更多
啃猪蹄的小仙女
6楼-- · 2019-01-22 14:24

I got rid of the properties by open a new DB.|(I didn't want to delete my old folder ) Create a new folder beside the default folder stop the server choose the new folder and start again a new DB with new PW

查看更多
登录 后发表回答