Check whether a node exists, if not create

When using MERGE on full patterns, the behavior is that either the whole pattern matches, or the whole pattern is created. MERGE will not partially use existing patterns — it’s all or nothing. If partial matches are needed, this can be accomplished by splitting a pattern up into multiple MERGE clauses. http://docs.neo4j.org/chunked/stable/query-merge.html MERGE (n)-[:know {r:’123′}]->(test2 {name:’2′}) will … Read more

Pulling data from Neo4j using PySpark

I am not sure I fully understand the problem. But as I read it: You have no problems connecting to Neo4J or handling any of the Neo4J-specific elements. You are not able to properly manage multiple partitions; there is no persistency or means to ensure that communication across partitions is correct. If my understanding is … Read more

Neo4j – Match by multiple relationship types

Yes, you can do something like: match (gal:Person{name:”Yoav”})-[:liked|:watched|:other]->(movie:Movie) return movie Take a look in the docs: Match on multiple relationship types EDIT: From the comments: I need “and” between the relation types.. you gave me an “or” In this case, you can do: match (Yoav:Person{name:”Yoav”})-[:liked]->(movie:Movie), (Yoav)-[:watched]->(movie), (Yoav)-[:other]->(movie) return movie

neo4j: How do I change the database storage location?

You first need confirm that the database you are connecting to was properly shut down (means you should not take the image of a running database). Set the location of the database if you are in server mode from the file conf/neo4j-server.properties by editing the below line. org.neo4j.server.database.location=data/graph.db if you are using embedded neo4j you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)