Neo4j - How to delete unused property keys from browser? - neo4j

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:
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!

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.

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.

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.

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.

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

Actually, there is not a way to just delete the unused properties. You need to recreate the graph or use a tool to copy neo4j stores called "store-utils".

Related

neo4j can't see database from terminal

this might be a stupid question but I'm new to neo4j.
I'm using the desktop version and from there I created a new database from a new project. I also can see it from the browser and I can see data and stuff.
But if I go on my terminal and run
cypher-shell
and from there I type
SHOW DATABASES;
I can only see the default dbs:
Does anyone know what I am doing wrong?
From the Neo4j desktop, you'll see the Start/Stop and Open buttons for a project database. Just to the right of these are 3-dots. Click on that and then open folder. This will get you to the various folders for the database. It's useful for seeing the size of the database, working with the config file, managing transaction logs, etc.

Neo4J Connection issues to local project

I am really sorry to ask a simple question like this, but it is getting frustrating. I installed neo4j 4.0.4 on my Windows machine, created a new project as shown in the official tutorial video and set a password for my local graph. Funnily, the tutorial video ends after setting the password and opening the browser not showing how to perform Cypher queries on this newly created database. In neo4j Desktop my database is shown correctly and it seems to be up and running.
However, when I try to connect to this database via the browser, I do not see the database at all. It is so confusing when connecting to the server to specify a username and password, if you only need to set a password for your database?! The default neo4j user can see the system and default database but not my project database. In addition, I cannot link files from the project directory in Cypher queries. I tried to disable authentication, but it did not help at all.
When I issue SHOW DATABASES command, it does not list my database as well.
Update / Edit:
Seems I misunderstood the concept of projects. Every database is named neo4j - default, regardless of the name specified in the project ?!. However, I still cannot access project files. So far, I copied the files manually in the database directory under "imports". But I guess that is not the intended way.
After importing data to this default database, it still shows no data in the project itself.
Data files in the imports directory are not automatically imported into the DB. That is because neo4j has no idea how you want to store that data as nodes and relationships.
So, it is up to you to determine your desired data model, and then write the appropriate code to enforce that data model.
You can take a look at this page to learn about how to import CSV data (probably the most commonly used import data format).

Empty properties list on Neo4j browser 3.0.11

I tried to delete all content in my Neo4j 3.3 database through the Neo4j browser. I used:
MATCH (n)
DETACH DELETE n
Unfortunately, the browser is keeping a list of old (obsolete) property keys, so that (after refilling the database) autocomplete still lists these property keys that are gone. Any way to get rid of them?
As described here, Neo4j Browser just display the data provided by Neo4j database through CALL db.propertyKeys().
There is an open issue in the Neo4j's Github repository about removing unused property keys from db.propertyKeys() results.
Since you are deleting all your nodes and relationships, you can alternatively delete all content of <neo4j-home>/data/databases/graph.db/ folder and restart Neo4j service. But you will need to recreate all indexes and constraints.

Neo4j import tool (Bulk) - Why is the restart required?

This question came up on our team a few times.I don't know the real answer.
Can someone point out in the right direction to better understand why restart is needed after bulk importing CSV files?
Or is there an option to tell neo4j to silently point to new DB folder and no restart?
Cheers!
The import utility creates a previously non-existent database. Offline (that's the whole point), so Neo4j can not be running on that database and the resulting folder can not exist beforehand. So even if you use the default folder name (graph.db) you have to start Neo4j after the import. Or change neo4j.conf to point to the newly created folder and then start Neo4j. Either way you have to start/restart Neo4j ... changes to the configuration are not picked up by the software.
Hope this helps,
Regards,
Tom

Neo4j Cypher Console Changing Database

I've just started to learn the Neo4j graphs db, i am a .net developer and i have downloaded the .net version also the sample MVC project for .net (hour ago), I manage to make the project run and playing with it. Upon playing with the Cyphers Console, somehow i cant find the data's from the sample, maybe the default database of the console is pointing to the default db, how do i move to the database that is created by my sample project. is there such thing as database/schema here just like in MSSql/MySQL that tables are grouped by database?
thanks for response.
Look at neo4j-server.properties in conf folder in your DB folder, and search for org.neo4j.server.database.location and make sure it's pointing to the output folder you just created..

Resources