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

Specifying the primitive type of a property in a Cypher CREATE clause

Contrary to what's possible with the Java API, there doesn't seem to be a way to specify whether a numeric property is a byte, short, int or long: CREATE (n:Test {value: 1}) RETURN n always seems to create a long property. I've tried toInt(), but…
Frank Pavageau
  • 11,477
  • 1
  • 43
  • 53
4
votes
1 answer

Cypher Optional Match

I have a graph in that contains two types of nodes (objects and pieces) and two types of links (similarTo and contains). Some pieces are made of the pieces. I would like to extract the path to each piece starting from a set of objects. MATCH…
Pierre
  • 885
  • 2
  • 10
  • 25
4
votes
1 answer

Neo4J - Storing into relationship vs nodes

I was wondering if there are any advantages or disadvantages in storing data into relationships or nodes. For example, if I were to store comments related to a discussion into the DB, should I store the comment data in a "comment" relationship or a…
RazorHead
  • 1,460
  • 3
  • 14
  • 20
4
votes
0 answers

Neo4j REST API Memory Leak

I am continuously updating a neo4j graph through the REST API with concurrent requests. I open and close each transaction explicitly, am using the recommended garbage collection method (ConcurrentMarkSweep), my memory maps are big enough to store…
4
votes
0 answers

Neo4j 2.2 installation and upgrade from 2.1.5 under linux

Just not quite sure what I've been doing wrong here. I had the neo4j database 2.1.5 working fine under linux(except being slow). so I tried to upgrade to 2.2 version. These are the step I took: 1. stop 2.1.5 2. copy from 2.1.5/data/graph.db to…
nafas
  • 5,283
  • 3
  • 29
  • 57
4
votes
1 answer

Cypher - odd behavior when matching for nodes that don't have a relationship

I've been trying to filter all nodes that are not connected to nodes of a given type, and discovered an odd behavior. Specifically in my current small example, I had two actors connected to a single movie, and another movie with nothing connected to…
4
votes
1 answer

How to get the response of a cypher query in neo4j using python Rest api

I am using Python to access neo4j and create nodes. Before I create the node I want to check if it exists. I run this query: "query" : "match (PPnode:Node) return PPnode" And using the method of requests library: r.text I…
user1919
  • 3,818
  • 17
  • 62
  • 97
4
votes
4 answers

cURL command - Neo4j

I have a problem in using of cURL as HTTP client with Neo4j. When I write this command : curl http://localhost:7474/db/data/ (or any URL, like http://localhost:7474/db/data/node/) Then I get this result in JSON format: { "errors": [ { …
ista9im
  • 79
  • 2
  • 10
4
votes
1 answer

Neo4J Return column alias (AS) name with space, is it possible?

Using Neo4J 2.1.6 with Cypher. I was wondering if it's possible to "alias" a query result column with a string containing spaces? Following code generates error: error with "..." MATCH (a) RETURN a.name AS "My Alias Column Name"; error without…
Carlo Luther
  • 2,402
  • 7
  • 46
  • 75
4
votes
2 answers

Neo4j cypher - Import CSV and add relationships between nodes based on the csv values

Is it possible in cypher to create different relationship between nodes based on the value of csv using the import functionality . Eg : For a given csv data product_id user_id action 1 1 VIEW 1 2 PURCHASE I…
krishnaraj vr
  • 121
  • 1
  • 7
4
votes
1 answer

Initiate and return node property if it does not exist using a single Cypher query

I'm looking for a single Cypher query that will increment an integer node parameter and return the value while initiating it to 0 in case if it does not exist. Something like following pseudo-Cypher: MATCH (n:Order) IF n.product_count IS NULL THEN…
Maciej Sz
  • 11,151
  • 7
  • 40
  • 56
4
votes
2 answers

Neo4J Cypher - finding meeting point of two paths

This is more of a "how to" question, there can be different ways but trying to find the most performant and effective way of solving this requirement. I have a graph where there are nodes that act as fork nodes i.e. they spawn into two paths and…
deepesh
  • 513
  • 1
  • 7
  • 18
4
votes
1 answer

How to create a d3 radial-tree from a list of nodes and links?

I extract nodes and relationships from a neo4j database using the following cypher query: match p=(:Root) <-[:linkedTo]- () unwind nodes(p) as n unwind rels(p) as r return {nodes: collect(distinct n), links: collect(distinct {source:…
Pierre
  • 885
  • 2
  • 10
  • 25
4
votes
1 answer

Neo4j gem - Querying relationships that do not exist

I don't really have the code for this yet but I have the opposite of what I need current_user.friends(:f).match_to(event) This is going to return the friends that have a relationship to my event node. What I need is the ones that don't have this…
Clam
  • 935
  • 1
  • 12
  • 24
4
votes
4 answers

rake db:seed is not working using neo4j gem

I have stated working on neo4j with rails using the gem 'neo4j', I want to seed some data in neo4j database. But whenever I am trying to do rake db:seed, it says rake aborted! Don't know how to build task 'db:seed' I have checked all the rake…
Sabyasachi Ghosh
  • 2,765
  • 22
  • 33