Questions tagged [cypher]

Cypher is a graph query language for Neo4j and AgensGraph. For ciphers as in encryption, see cipher.

Cypher is a declarative graph query language provided by the graph database.

If you are doing encryption, use the tag (note spelling) or .

9748 questions
2
votes
2 answers

Performance in USING PERIODIC COMMIT n - Neo4j

I'm using the LOAD CSV command to import nodes and relationships in Neo4j. For better performance I'm using as well USING PERIODIC COMMIT, because I use large files to import (+/- 50 millions of records in each file). I want to know if is better…
Jhonathan
  • 330
  • 1
  • 2
  • 14
2
votes
2 answers

All permutations of a relationship

I'm not understanding how I can return all available configurations of a relationship. It's probably easy but I just can't wrap my head around it. For example, given: e.g CREATE (:STARTER{name: 'start'}), (:ENDER{name: 'end'}) CREATE…
Airomega
  • 574
  • 6
  • 22
2
votes
2 answers

Importing CSV file in Neo4j

While using this command LOAD CSV FROM "file:///artists.csv" AS line CREATE (:Artist { name: line.Name, year: toInt(line.Year)}) I am getting Error: Type mismatch: expected Any, Map, Node or Relationship but was List (line 2, column 25…
Aman Kumar
  • 137
  • 1
  • 1
  • 8
2
votes
1 answer

Delete all of the same relationship type between two node but still keep one of them

I have many relationships(same type) between 2 node. Now I want to delete all of them but still keep a relationship.
kien bui
  • 1,760
  • 2
  • 17
  • 33
2
votes
2 answers

Neo4J: How to hide a specific node in the graph visualisation?

I have currently visualised a graph between myself and a number of other people. My Current query is: MATCH (p)-[:emailed]->(m) WITH p,count(m) as rels, collect(m) as Contact WHERE rels > 2 RETURN p,Contact, rels It creates a pretty complex…
MShariff
  • 41
  • 3
2
votes
0 answers

neo4j spring data get related nodes with relationship

Having trouble with getting related nodes of a certain node entity. For example this class @NodeEntity public class A extends Entity { @Relationship(type = ARRelation.TYPE, direction = Relationship.OUTGOING) private R r; } Suppose I have…
dinamix
  • 651
  • 8
  • 22
2
votes
2 answers

Execute query on neo4j database from Java, parsing the result

I access the neo4j database via GraphDatabaseService. I added some nodes and relation and want to do a query. My goal is to get all Nodes that got an Calling relation to the endnode. So i have the whole paths to this node. (e.g.: node1 -calling->…
Stefan
  • 438
  • 4
  • 9
2
votes
1 answer

Graph-Aided Search Result filtering example

I've duplicated the Movie database of Neo4j on Elasticsearch and it's indexed with the index nodes. It has two types Movie and Person. I am trying to make a simple Result Filtering with Graph-Aided Search using this curl command line: curl -X GET…
Benz
  • 289
  • 4
  • 15
2
votes
2 answers

Neo4j / Cypher - Conditional set/create/etc statement based on count (or any previous query statement)

How do you conditionally do a SET (or anything else) based on the result of a previous line? So for example the query below (which doesn't work atm), where I'm trying to update something based on if the count is 1 (and not do it otherwise). Query…
Jason Simpson
  • 4,653
  • 5
  • 16
  • 26
2
votes
1 answer

Return a single relationship from multiple relationships between 2 nodes in neo4j

I am new to Neo4j and I have some trouble filtering out relationships in a return statement. I created two nodes and 3 instances of the same relationship between these two nodes that differ only in the value of the properties: create (p:person…
2
votes
1 answer

Neo4j and parameterized queries

I'm looking into using Neo4j for a project, but I'm a bit confused when it comes to best practices. I would normally assume that the official C# driver provides a method of parameterizing queries, but I can't see anything in the official…
bjelleklang
  • 476
  • 3
  • 8
  • 25
2
votes
1 answer

explanation for "properties" object in the response of neo4j

using: node.js - version 8.0.0 neo4j-driver: 1.3.0 neo4j database: community edition, version: 3.2.0 i am running a cypher (not important what exactly is the cypher) and getting back a result. after parsing the result using the follwing…
LiranC
  • 2,400
  • 1
  • 27
  • 55
2
votes
1 answer

Neo4J - How to create a new node based on splitting an existing relationship property and automatically creating a link?

I have a network of nodes which represent People which are connected by relationships (Emails). The Receiver of the Email is m.slug Based on: ()-[r]-(m) I wish to split the property (in this case "Sender" / m.slug ie Larry@google.com)and create a…
MShariff
  • 41
  • 3
2
votes
1 answer

Get nodes which are not connected to specific node in Neo4j

I want to get all the nodes which are not connected to the given set of nodes. Suppose I've 5 nodes A,B,C,D,E. Now A->B->C are connected with the :Is_Friend relationship. Now I want all the nodes which are not connected to A (i.e D and E). I tried…
Tg0206
  • 23
  • 1
  • 5
2
votes
2 answers

Create triadic closures in Neo4j between hundreds of thousands nodes using Cypher does not work

I got a problem creating triadic closures for a huge amount of nodes and relationships. I used to search for an answer for hours, but nothing really matched my problem. The dataset: 322276 nodes with label PERSON (with index on property…
1 2 3
99
100