cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Unattached Property Key

andy_hegedus
Graph Fellow

HI,

It appears as if I have property key that is not attached to anything.

MATCH (n) WHERE EXISTS(n.ter) RETURN DISTINCT "node" as entity, n.ter AS ter LIMIT 25 UNION ALL MATCH ()-[r]-() WHERE EXISTS(r.ter) RETURN DISTINCT "relationship" AS entity, r.ter AS ter LIMIT 25

Is returning:
(no changes, no records)

Any idea of root cause and how to get rid of it with out either a node or relationship attached to it.
Andy

3 REPLIES 3

Hello @andy.hegedus

You should have a look at this article.

Regards,
Cobra

andy_hegedus
Graph Fellow

Hi Cobra,

Thank you for your response and in looking at the article it provides two methods.

If you need to remove the property keys your options are either

1. recreate the graph

or

2. use GitHub - jexp/store-utils: Utilities to compact, copy, fix, analyse Neo4j stores which is an offline process to read a graph.db and copy its (contents, nodes, relationships) to a new graph.db and only include propertyKeys associated with nodes

In the link to the utility it mentions this and an official tool with link:
From Neo4j 4.0 please use the official tool that has the same capabilities.

If I go to link it gives me a 404 error.
Is there an official tool since the database in question is 4.2.7.

Andy

If I'm not wrong, you have to copy the database, this is the current link to the doc.

If you want to recreate the graph without creating a new database, you can use CREATE OR REPLACE DATABASE nameOfDatabase