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
0 answers

Neo4J browser: Unexpected behavior when saving list of strings as parameter

In using the Neo4J browser UI, I encountered this strange behavior when trying to pass a list of strings as a parameter. (I was doing this so that I could query for nodes having a property value in the list.) $ :param names: ["bob", "alice"] $…
user19650
  • 153
  • 9
2
votes
1 answer

neo4j APOC does not work locally on Win10

edit: Using Neo4j Community Edition 3.2.1. I successfully installed APOC on my remote machine (debian) and it's working just fine. However locally (Win10) I can't seem to get it to work. What I did: pasted the jar into the plugins folder tried to…
tscherg
  • 1,032
  • 8
  • 22
2
votes
1 answer

Neo4j 3.2 Cypher low performance

Without getting unnecessarily too specific, I'm facing the following issue with Cyper in Neo4j 3.2. Let's say we have a database with 3 entities: User, Comment, Like. For whatever reason, I'm trying to run the following query: MATCH (n:USER) WHERE…
user3455402
  • 119
  • 1
  • 9
2
votes
1 answer

Apoc Dijkstra traversing in both directions while computing shortest path

I've been trying to use neo4j and its apoc process library to get shortest path between 2 nodes. For example I create 2 nodes as below CREATE (:Point {title:'A'}) CREATE (:Point {title:'B'}) Then I establish their relationship as such MATCH…
MrRo
  • 53
  • 5
2
votes
1 answer

Exposing data to BI and generating reports in neo4j

What is the best practice exposed data to BI from neo4j ? and If we are generating reports what is best practice to generate reports in Neo4j Need your guidance on this
nad.SN
  • 77
  • 7
2
votes
1 answer

Cypher to get "unique longest simple (acyclic)" paths from given source node

I have this simple graph: create (a:ent {id:'a'})-[:rel]->(:ent {id:'b'})-[:rel]->(c:ent {id:'c'})-[:rel]->(d:ent {id:'d'})-[:rel]->(:ent {id:'e'})-[:rel]->(a), (d)-[:rel]->(c), (c)-[:rel]->(f:ent {id:'f'})-[:rel]->(g:ent…
Mahesha999
  • 22,693
  • 29
  • 116
  • 189
2
votes
2 answers

Neo4j match Relationship parameters satisfying a certain schema

Using cypher, is there any way to match a path where the relationships satisfy a certain input schema generically? I know I can do something like parameters: { "age": 20 } MATCH (n)-[r:MY_RELATION]-() WHERE $age>18 AND $age<24 ... when i want…
tscherg
  • 1,032
  • 8
  • 22
2
votes
1 answer

How to count items and then simultaneously return the first item and the count?

I have a Item node, which can be LIKED by a User node, and what I'm trying to achieve is: List all unique Item nodes that were liked by a User, sorted by the time of LIKE For each Item node listed above, also list the User node that most recently…
Gaurav Jain
  • 419
  • 4
  • 17
2
votes
3 answers

Obtaining top most node in Cypher

I do have relationship like following, through my Cypher query I'm beginning with Segment1 and getting relationships accordingly. (Segment1)-[:Leaf]->(Op1)-[:Account]->(Ac2)-[:Parent]->(Acc1)-[:Parent]->(Acc) I want to get the top most node of…
nad.SN
  • 77
  • 7
2
votes
1 answer

querying a DB for an unknown element with a given uuid

Lot of years ago, I discussed with some neo4j engineers about the ability to query an unknown object given it's uuid. At that time, the answer was that there was no general db index in neo4j. Now, I have the same problem to solve: each node I create…
Paolo Di Pietro
  • 517
  • 3
  • 17
2
votes
1 answer

DELETE and CREATE Cypher statements in one transaction

I'm writing a python 3.6 application that uses Neo4j as a backend with the official python driver. I'm new to Neo4j and Cypher. Data coming into the database needs to replace previous 'versions' of that data. I'm attempting to do this by creating a…
James Schinner
  • 1,549
  • 18
  • 28
2
votes
2 answers

Cypher left outer join sql analog

I'm trying to match all nodes with specific label that has no relationship or have specific relationship. something like this two queries combined: MATCH (f:Field) OPTIONAL MATCH (f)--(t:Type) WHERE id(t) = {id} RETURN f + MATCH (f:Field) WHERE…
share_m
  • 23
  • 2
2
votes
1 answer

neo4j sum up values

I'm trying to get Total(Sum) of a property of "df" object.I have attached screen shot of sample database I'm using I tried to get the graph using following query MATCH P= (n:Org)-[:O_CH*0..]->()-[:LEAF*0..]->()-[:CH*0..]->()-[:FOR*0..]->()…
nad.SN
  • 77
  • 7
2
votes
1 answer

Cypher query to return path with specific relationship types

I've set up a Neo4j Graph DB. And I've the following Nodes and Relationship Types: My question is how I get the Path between 2 Nodes from Station only with relationship type "BUS"? Station(1)->BUS->Station(31) Thank you.
Hans
  • 23
  • 3
2
votes
2 answers

Neo4j expand array elements into separate rows

I have a CSV file that has columns that contain arrays. The file looks like this: siblings [3010,3011,3012] [2010,2012] What I am trying to do is to return the elements of the arrays as separate rows. I looked through the documentation and found…
Porjaz
  • 771
  • 1
  • 8
  • 28
1 2 3
99
100