Neo4j color added automatically without adding - neo4j

I have added a color to particular node type and deleted the database. And if I load the database again, it is taking the same color for that node.
Do we need to delete any caches?

try to clean the browser cache

Related

Neo4j - web interface database info says "no node labels in database" when my nodes have labels

I imported a graph database into neo4j where the node files had labels assigned in the headers, as the manual instructed. When I use the web interface, the database details tab says there are no labels in my database though. When I run queries involving node labels, everything seems to work. Has anybody else run into this issue?
Try reloading the browser page. The displayed Node labels are not updated dynamically.

Neo4j - How to delete unused property keys from browser?

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".

How to remove a label from the Neo4j Browser interface?

I created a node accidentally with the wrong label so I deleted it, but now this type-o forever lives as a node label in my browser interface. How can I get rid of that?
Right now it's not possible, it just lives in the store until you recreate or copy the store and leave it out (you can use my store-utils for that)
In Neo4j 2.3 the label will no longer be displayed.

Fixing neo4j consistency errors

After upgrading to 2.1.6 we started noticing the following error during the consistency checks of a full backup:
This node record has a label that is not found in the label scan store entry for this node
Is there any way to rebuild the label scan store?
Similarly, is there a way to fix these index errors:
ERROR: This node was not found in the expected index.
Unfortunately going to a previous backup is not an option since we need the new data and cannot recreate it.
You can use https://github.com/jexp/store-utils to copy over the datastore. The tools reads from a source datastore and writes it's data to a new datastore. Not 100%, but I'm pretty confident that this will solve your issue.
Or you could shut down the db, delete the label index /schema/label/ so that when you start again the label index will be rebuilt.

Change Or Delete Label with Cypher in Neo4j

In a Test, I made many types of nodes and relationships with Cypher syntax.
After all, I delete all of unneccessary nodes and their relations.
Actually, there are Types and Labels still there in my Browser
Are there any method to clear Or change name of unneccessary Type, Label with Neo4j and Cypher..??
Best regards
All the information is stored in the browser local storage. So If you are using chrome browser, once you are in localhost:7474/browser. right click your mouse and select "Inspect Element", this will open a chrome developer tool, then go to Resources and under resources, go to "Local Storage", you should see "http: //localhost:7474". select it. and select the key neo4j.grass, you can modify the value, by copying out and copying it back. or you can just delete the whole record (key and value) and close your browser. Open your browser again. start clicking on the labels. you will only see the labels you want. You can repeat this to clean up until neo4j come out with a better way.
if you are using firefox, you can install firebug, and click on the firebug then dom then local storage. then you can do the similar thing
for other browser I am sure that you can figure out ways(google) to clear the local storage
This cypher query deletes all nodes and relationships:
start n=node(*) match n-[r?]-() delete n, r;
You can customize it adding index or asking if it has attributes:
start n=node:users(':') match n-[r?]-() delete n, r;
If you've removed the labels from all nodes you should be able to get a clean result visualization stream by clearing your web browser's cache/cookies. This will not remove them from the info bar on your left, only from the graph vis. frame. Since labels and relationship types are database global constructs, unlike properties, they can exist in the database also after all their instances have been deleted. That may be the intended behavior, but I would expect there to also be a way to remove them completely from the database when 2.0 is released (if there isn't a way already that I've missed). If you want a clean start you can always stop your server, delete your database directory, and restart the server. You may still have to clear your browser or you may see ghost labels from your old database still haunt your visualization stream.
Searching for a removed label, I found that they are still left in data/graph.db/neostore.labeltokenstore.db.names, wh.
Remove nodes you don't want, backup DB, purge DB data dir, stop / start server, reinsert DB, enjoy.
I tried following on both Firefox and Chromium and it didn't work:
removing all nodes of types I no longer used
clearing localStorage neo4j.grass key - it does contain labels, but this doesn't help
clearing whole localStorage (completely)
stopping / killing server and bringing it back after points above
removing files with labels in their names from DB data dir
removing all neo4j cookies (in fact, later, whole browser cache as well)
Since purging DB and reinserting data worked, and since clearing local storage and launching another browser gets you same labels you had, I'm guessing the info is held partially in localStorage AND partially in files in graph.db dir (or however your DB dir is called). Files there are often binary, so I picked redoing whole DB (since it wasn't big anyway) over blind edits or decoding binaries - simply faster.
EDIT:
You may try something I've just spotted:
label > properties > view Stylesheet > click on drop icon (looks like extinguisher). This should drop the grass key.
You may need to have at least one node of given type for that, to open a view where you actually set up node display (colors and other properties) to get to it's stylesheet.

Resources