Neo4j and Neo4jClient dis and dat
Below is various stuff I have found while working with Neo4j and Neo4jClient. Helpful? Dunno. At least it is better to keep text searchable than living just in my head. To be forgotten. Like tears in rain.
Neo4jClient can be installed through Nuget. Install-Package Neo4jClient. Awesome.
How to do some calls is here: http://hg.readify.net/neo4jclient/src/4693da483a90/Test/ApiUsageIdeas.cs
Stackoverflow tag for Neo4jClient is here: http://stackoverflow.com/questions/tagged/neo4jclient
Info on creating index is found here: http://romikoderbynew.com/2011/08/28/lucene-full-text-indexing-with-neo4j/
Creating a relation is a totally different horse than node. Why? Here is dotnet code for said: http://blog.micic.ch/net/using-neo4j-graph-db-with-c-net
Finding all nodes, and deleting them if wished is found here: http://stackoverflow.com/questions/12903873/neo4j-get-all-nodes-in-a-graph-even-those-that-are-unconnected-by-relationship.
The queries are
1 2 | START n=node(*) RETURN n |
and
1 2 3 | START n=node(*) MATCH n-[r?]-() where ID(n) <> 0 DELETE n, r; |
(replace <> with <>
Looking at an index in the web client:
For getting all nodes for an index with index name “MyIndexName” and property “MyProperty” write
1 | node:index:MyIndexName:MyProperty:* |
in the web admin. It also works with an exact index.
Writing a Relation is not as easy as writing a node. Se here: http://blog.micic.ch/net/using-neo4j-graph-db-with-c-net
I have not been able to confirm that it is possible to write properties on the relation.
Reading the relation again through its ID is also not as easy a reading a node. A workaround is to use Gremlin: http://stackoverflow.com/questions/15086596/how-do-i-use-neo4jclient-to-get-a-neo4j-relation-by-its-id