Reputation: 31
I am using the Neo4j Monitoring and Management tool (localhost:7474, Neo4j v 1.8.2) because I think that it is a good way to visualize the data. I am facing some issues though:
CREATE n = {type : 'company', name : 'neo4j'} RETURN n START n=node:auto_node_index(name='neo4j') RETURN n
I don't get any matching data, but instead: Returned 0 rows. Query took 25ms Where am I wrong?
2.How can I make visible data that I created with an embedded java application and vice versa? Since Neo4j stores it data in /var/lib/neo4j/data/graphdb I tried to configure the path of the GraphDatabaseService like that:
String DB_PATH = "cd /var/lib/neo4j/data/graphdb"; GraphDatabaseService db = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );
which obviously does not work, since the directory is created and it not switched into there. Sorry, I'm quite a newbee to this.
Any hints are greatly appreciated ;) Thanks a lot!
Upvotes: 0
Views: 610
Reputation: 19373
a) Create the node using Cypher and return the created node. In your Java app, get that node and add to the index manually (see http://docs.neo4j.org/chunked/milestone/indexing.html for info on how to do that)
b) Create the node using the Neo4j API in Java and index it
2
If you want to use Java to create a graph, use any path that you have permissions to write to (it does not always have to be var/lib/neo4j/graphdb) :
String DB_PATH = "/var/lib/neo4j/data/graphdb"; GraphDatabaseService db = new GraphDatabaseFactory().newEmbeddedDatabase( DB_PATH );
then you can point webadmin to the path in DB_PATH by setting this in conf/neo4j-server.properties
org.neo4j.server.database.location=/var/lib/neo4j/graphdb
Upvotes: 1