How to clear neo4j properties after deleted all data?

Asked

Viewed 418 times

1

I was doing some tests with the neo4j and suddenly I saw myself before many us and then I decided to clean everything, so I could start working with an application.
So I executed the following command:

match ( n ) detach delete n

He then cleaned up all the knots I had, as expected!! The point is that they stayed on the tab

Database Information in the Property Keys field

A few tags I had used before!! How can I remove them?

Here’s an image of how it looked after I removed all the nodes:
inserir a descrição da imagem aqui

I would like to remove everything that is circled with red.

2 answers

2

You should be able to clean up everything by:

  • Stop your Neo4j database
  • Deleting the corresponding data / Graph.db / * (look inside the Graph.db folder)
  • Reactivate the data bank
  • Thank you , soon I will do what says here in your reply.

  • You’re welcome ;) it’s always good to help!

0

This is the link from the Neo4j manual where it is taught how to remove all properties.

In the manual it says that other than deleting nodes and relations, it is not possible to delete all properties of all nodes at once, but to remove all properties of a Node you could use the following command:

MATCH (p { name: 'Peter' })
SET p = { }

Roughly speaking you would be replacing all the properties of p for nothing, that is, excluding those properties.

In your case, if you have already deleted all nodes, just vc restart the bank because the properties only exist if there is a Node, so when you reset the bank all properties whose nodes have been deleted will also disappear.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.