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
4
votes
1 answer

Neo4j: Match multiple destination nodes

How to efficiently construct a query of the form: MATCH (a)-[:Foo]->(b) WHERE (a)-[:Bar]->(c) AND (a)-[:Bar]->(d) RETURN a which is a query for [Foo]----(b) (a)---| [Bar]----(c) | [Bar]----(d) However I would like to have…
PQuinn
  • 992
  • 6
  • 11
4
votes
2 answers

seaching a repeated pattern in neo4j

One bill of material relationship is composed of two relationships. I then find my component definition by searchin this relationship : (a:Part)-[:consumes]->(b:partBom)-[:referencedBy]->(c:Part) How can I repeat this pattern in a cypher request…
4
votes
1 answer

How to Increment consistently in Neo4j, Cypher is too slow?

Im currently using Neo4j 2.0+ and cypher to create and save sessions. My project at times requires multiple writes per second to a node labeled 'ChildSession', and I notice that when I 'increment' the ChildSession_ID in cypher, I often have…
1ManStartup
  • 3,716
  • 4
  • 21
  • 26
4
votes
3 answers

How to get last node created in neo4j?

So I know when you created nodes neo4j has a UUID for each node. I know you can access a particular node by that UUID by accessing the ID. For example: START n=node(144) RETURN n; How would I get the last node that was created? I know I could…
WildBill
  • 9,143
  • 15
  • 63
  • 87
4
votes
1 answer

Create nodes and relations conditionally when loading nodes from csv in Neo4j

I have a data set in csv format. One of the fields is a type, like an enumeration. Based on this type I need to create different types nodes and relations when loading the data using csv load. You could call a row in the csv for a super type having…
stoffer
  • 2,317
  • 2
  • 18
  • 24
4
votes
1 answer

Recommendation algorithm applicable in eCommerce site and solved using neo4j graph database

I am planning to implement product recommendation in my eCommerce site using neo4j graph database . Recommendation will be based on User action on a product. Actions will be - Product View , - Rating , - Read book - Download book , …
krishnaraj vr
  • 121
  • 1
  • 7
4
votes
3 answers

Full text search in Neo4j with spaces

When the neo4j lucene auto index is in exact mode (which is the default) queries of the type: start n=node:node_auto_index('name:asfd\\ a*') return n Work correctly (assuming you have a node with the name asdf adsf for instance. However when…
jun
  • 759
  • 6
  • 16
4
votes
2 answers

Neo4j Cypher query with hierarchy in relations

I have a database with some movies. The movies are released in regions with a hierarchy. The hierarchy is like this (Global)-[contains]->(EU), (Global)-[contain]->(US), (EU)-[contains]->(UK), (EU)-[contains]->(SE). I want a Cypher query that will…
user3115696
  • 311
  • 2
  • 14
4
votes
1 answer

Neo4j Cypher: MERGE conditionally with values from LOAD CSV

I'm trying to import from a CSV where some lines have an account number and some don't. Where accounts do have numbers I'd like to merge using them: there will be records where the name on an account has changed but the number will always stay the…
bicpence
  • 167
  • 3
  • 9
4
votes
4 answers

how to pass parameter to cypher query in py2neo

I have a variable name="Rahul" and, I want to pass this variable to cypher query in Py2neo in the following manner: line=session.execute("MATCH (person)WHERE person.name=name RETURN person") but i am getting an error -…
Saubhagya Jena
  • 141
  • 1
  • 2
  • 3
4
votes
0 answers

Neo4j keeps crashing

Neo4j is crashing on me multiple times per day. I am running the Enterprise 2.1.2 edition on a Ubunutu 14 box with 16gb RAM and a 6-core proc. The graph is not very large, however I am continually running out of heap space, and the database…
Conar Welsh
  • 619
  • 4
  • 8
4
votes
2 answers

Passing parameters to cypher query in @Query in Spring Data Neo4J

I have a User domain which: 1) String username, 2) String password, 3) Roles [] roles (Roles is enum). A method in my UserRepository is as follows: @Query("MERGE (n:User:_User { username: \"{0}.username\", password: \"{0}.password\", roles:…
suksant
  • 43
  • 1
  • 4
4
votes
1 answer

Poor performance of Neo4j virtual machine in windows azure

I have created Neo4j virtual machine in windows azure.How to increase the performance of it?Now it takes time in 30-50 seconds range for simple query also.How to improve this?Any one can please help? My sample data model is given below public class…
Midhuna
  • 4,523
  • 4
  • 21
  • 22
4
votes
2 answers

Cypher - Remove all properties with a particular value

I'm searching for a way to remove every property, of any node in the DB, having a specific value using Cypher. Context I got a csv bulk file from a relational table with plenty of NULL values. LOAD CSV brings them as values. Removing them (replacing…
Nadjib Mami
  • 5,736
  • 9
  • 37
  • 49
4
votes
2 answers

Neo4j Database modeling for Multi Level Marketing

I'm trying to model a graph database for neo4j database. Here's the details: Agents - Products - Ranks - Commissions. There will be agents. There will be products ( say health products ). An agent will join under another agent or can join…
deus
  • 77
  • 5