Questions tagged [neo4j]

Neo4j is an open-source graph database (GDB) well suited to connected data. Please mention your exact version of Neo4j when asking questions. You can use it for recommendation engines, fraud detection, graph-based search, network ops/security, and many other user cases. The database is accessed via official drivers in Java, JavaScript, Python and .NET, or community-contributed drivers in PHP, Ruby, R, Golang, Elixir, Swift and more.

Neo4j is a open-source, transactional, high-performance native graph database.

Neo4j stores its data as a graph: Nodes are connected through Relationships, both with arbitrary properties. Neo4j features a graph-centric declarative query language called Cypher. Its drivers support many programming languages. More details in the Online Training and the Neo4j Manual.

Neo4j offers a fully-managed cloud database (Database as a service) called Neo4j AuraDB.

For questions that are not suitable for the Stack Overflow Q&A Format, please reach out on Discord. Neo4j also maintains a public Feedback Board for feature ideas and future development directions.


Useful Links

External Resources


Related Tags

22696 questions
18
votes
5 answers

Neo4j - is it possible to visualise a simple overview of my database?

I've got my graph database, populated with nodes, relationships, properties etc. I'd like to see an overview of how the whole database is connected, each relationship to each node, properties of a node etc. I don't mean view each individual node,…
f7n
  • 1,476
  • 3
  • 22
  • 42
18
votes
1 answer

Neo4j: Cypher WHERE Clause vs. Curly Braces in MATCH Clause - Which is Better?

I'm new to Neo4J, and have been learning Cypher query language the past few days. I realized I can write my query like this... MATCH (b:Beverage)<-[:likes]-(p:Person)-[:likes]->(r:Restaurant) WHERE b.name = 'Beer' and r.name = 'KFC' RETURN…
limc
  • 39,366
  • 20
  • 100
  • 145
18
votes
6 answers

Best way to delete all nodes and relationships in Cypher

What is the best way to cleanup the graph from all nodes and relationships via Cypher? At http://neo4j.com/docs/stable/query-delete.html#delete-delete-a-node-and-connected-relationships the example MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r has…
George Birbilis
  • 2,782
  • 2
  • 33
  • 35
18
votes
3 answers

Delete node and its relationships (if it has any) in Neo4j

I'm trying to execute following query: MATCH (movie:Movie {title:"test"})-[r]-() DELETE movie, r to delete a :Movie node and all its relationships. It's all good, except if the query doesn't have any relationships, it fails to MATCH the movie. I've…
Srdjan Marjanovic
  • 375
  • 1
  • 3
  • 11
18
votes
2 answers

Auto increment property in Neo4j

As far as I understand it the IDs given by Neo4j (ID(node)) are unstable and behave somewhat like row numbers in SQL. Since IDs are mostly used for relations in SQL and these are easily modeled in Neo4j, there doesn't seem to be much use for IDs,…
Gregor Weber
  • 690
  • 9
  • 24
18
votes
4 answers

How to handle dates in neo4j

I'm an historian of medieval history and I'm trying to code networks between kings, dukes, popes etc. over a period of time of about 50 years (from 1220 to 1270) in medieval Germany. As I'm not a specialist for graph-databases I'm looking for a…
Andreas Kuczera
  • 353
  • 1
  • 2
  • 14
18
votes
7 answers

Remote connection to Neo4j server

I believe the way to creating a remote connection is by changing this line in conf/neo4j-server.properties, specifically by removing the comment and restarting the server. org.neo4j.server.webserver.address=0.0.0.0 My URL is…
Adam Carter
  • 4,741
  • 5
  • 42
  • 103
18
votes
3 answers

Simple way to delete a relationship by ID in Neo4j Cypher?

Using Match and Where can delete a relationship by ID. Match ()-[r]-() Where ID(r)=1 Delete r Is there a simpler way?
Rm558
  • 4,621
  • 3
  • 38
  • 43
18
votes
1 answer

Match nodes without labels

How to write a CYPHER query that returns only those nodes that do not have labels attached to them? I tried: match (n:) return n Invalid input ')': expected whitespace or a label name (line 1, column 10) "match (n:) return n" …
Daniel Krizian
  • 4,586
  • 4
  • 38
  • 75
18
votes
7 answers

Submitting multiple semi-colon separated Cypher statements through Neo4j Browser

I want to submit a list of semi-colon separated Cypher write statements via the web browser but I'm getting errors... MERGE (a:user{id: 'A'}) MERGE (b:product{id: '1'}) CREATE UNIQUE (a)-[:USED_BY]->(b); MERGE (a:user{id: 'B'}) MERGE…
Dirk Calloway
  • 2,569
  • 4
  • 23
  • 34
18
votes
3 answers

Anyway to have multiple databases on a neo4j instance?

Coming from a relational database mindset, it seems odd that one only one one graph db per instance of neo4j. Is the idea that we do multiple subgraphs starting from root ? Thanks
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169
18
votes
1 answer

neo4j: one-directional / two-directional relationships?

So I looked into neo4j, and I may be using it in an upcoming project since its data model might fit my project very well. I looked through the docs but I still need an answer to this question: Can I set relationships to be one-directional? It seems…
joschua011
  • 4,157
  • 4
  • 20
  • 25
18
votes
2 answers

Loading a Neo4j subgraph into Networkx

I have been dealing with Neo4j through python's Bulbflow and now need a way to save/export subgraphs. I have seen Java and even Ruby approaches for doing this, however a simple Python approach seems to be hiding from me.. So far, I have found two…
zanbri
  • 5,958
  • 2
  • 31
  • 41
18
votes
5 answers

Fastest way to perform bulk add/insert in Neo4j with Python?

I am finding Neo4j slow to add nodes and relationships/arcs/edges when using the REST API via py2neo for Python. I understand that this is due to each REST API call executing as a single self-contained transaction. Specifically, adding a few hundred…
wodow
  • 3,871
  • 5
  • 33
  • 45
17
votes
4 answers

How to connect to a locally installed neo4j server using Java

I'm new to Neo4J and couldn't find the answer to my question despite my hours of googling. So far, I have been following the tutorials and now I have a basic understanding of how/when to use Neo4j. Now, I am about to start modifying my hello-world…
PFrank
  • 323
  • 2
  • 4
  • 8