Questions tagged [cypher-3.1]

50 questions
0
votes
1 answer

How to return the value generated inside where clause in Cypher?

I have the following Cypher query: MATCH (n)-[r]->(k) WHERE ANY(x in keys(n) WHERE round(apoc.text.levenshteinSimilarity( TRIM( REDUCE(mergedString = "", item in n[x] | mergedString + item + " ")), "syn"), 4) …
SteveS
  • 3,789
  • 5
  • 30
  • 64
0
votes
1 answer

How to get the steps used to build the Neo4j Graph?

For example I am using the following Cypher code to build my initial graph: CREATE (forrestGump:Movie {title: 'Forrest Gump', released: 1994}) CREATE (robert:Person:Director {name: 'Robert Zemeckis', born: 1951}) CREATE (tom:Person:Actor {name:…
SteveS
  • 3,789
  • 5
  • 30
  • 64
0
votes
1 answer

NoClassDefFoundError while using cypher-dsl in an unmanaged server extension

I am trying to import neo4j-cypher-dsl into an unmanaged server extension. I can start the extension but when I call the REST API method that uses DSL code I see the following error in the log: javax.servlet.ServletException:…
Albert Gevorgyan
  • 171
  • 3
  • 10
0
votes
1 answer

How can I make my neo4j request faster on large research, then merge result with new node

I am currently having a performance issue on a Neo4J request. Here is the problem. I need to find users in the database from a large list. To do this, the uniqCode must match, OR the name and location (zip) must match. Then I want to be able to…
0
votes
1 answer

MATCH for nodes with variable label name NEO4J

By queries in neo4j I get name of label as variable so in the same query I want to find all nodes with this label. I know that I can't have variable for label name like this MATCH (n:${variable}) RETURN n and nor MATCH (n:variable) RETURN n I am…
Armen Sanoyan
  • 1,898
  • 2
  • 19
  • 32
0
votes
1 answer

NEO4j Moving averages in cypher

I have a day node and another node I want to average for every n days. I want there to be a moving window for every 7 days. And, I want to return every day. So, every row return will be the average of that day and the previous 7 days. I can't show…
0
votes
1 answer

Apoc.merge.relationship() creates duplicates in Neo4j

I am trying to create relationship between two nodes using apoc.merge.relationship, but it creates two same relationships, which I can see by search. They both have same direction and everything is the same although from query it's obvious that…
Armen Sanoyan
  • 1,898
  • 2
  • 19
  • 32
0
votes
1 answer

cypher remove null s from result

I've created a query in neo4j : MATCH (x:Node)-[r*1..2]->(y:Node) WITH x AS x, SIZE(COLLECT(DISTINCT y)) AS y WITH CASE WHEN y=10 THEN x.target END AS l return l AS target But returns something like…
Maifee Ul Asad
  • 3,992
  • 6
  • 38
  • 86
0
votes
1 answer

Neo4j/Cypher FOREACH square brackets and use of "THEN [1]"

I have seen multiple examples of cypher FOREACH statements that reference the number 1 in square brackets and I cannot find documentation on it. This is a working statement: FOREACH(i in CASE WHEN NOT rel IS NULL THEN [1] ELSE [] END | DELETE rel…
Matt Larsuma
  • 1,456
  • 4
  • 20
  • 52
0
votes
1 answer

Combine two cypher queries

Currently this is the data stored in the database Org Name Org ID A 1 B 2 C 5 D 9 I'm trying to combine these 2 queries: MATCH (n:Org) WHERE n.id in [1,2] RETURN n.name as group1_name, n.id as…
star_it8293
  • 399
  • 3
  • 12
0
votes
1 answer

What is the latest method to get all nodes and its relationship path using patterns in neo4j

I'm executing the below query in neo4j which returns me all the nodes along with its relationship paths Query MATCH (p:MyNode {name : "Vivek"})-[r*1..2]->(f:MyNode) return p,[x in r | type(x)] as rel,f Result {vivek} ["knows"] {Rajesh} {vivek}…
Vivek
  • 3,523
  • 2
  • 25
  • 41
0
votes
1 answer

How to list files that can be imported from within cypher-shell?

How can I run common Terminal commands (or equivalent command) such as ls for listing importable files from within Cypher-shell?
roschach
  • 8,390
  • 14
  • 74
  • 124
0
votes
1 answer

Join Keys from 2 nodes in a single return value in Neo4j 3.2.15 and cypher-3.1

I'm trying to get a "Friend Recommendation" query. The nodes have the next sequence (Node) - [FRIEND] - (Node) - [INFO] - (P_info) where every node have a INFOrelation with a P_info node asociated. I can get a list of recommended friends of a Node…
Ikary
  • 47
  • 1
  • 7
0
votes
1 answer

Create a node and assign it the sum of a column of the table in Cypher Neo4j

I am trying to figure out how to implement the OLAP operation Roll-up in Cypher. I am stuck with finding how to create a node and then assign it the sum of a column of a table in Cypher. More particularly, I am trying to achieve this result : Code…
kazrak
  • 3
  • 6
0
votes
1 answer

Persisting variable values to other parts of the cypher query

I am having a problem with my query where the variables defined inside a FOREACH clause is not available to a subsequent MERGE. In the snippet below, I check the existence of a value for each field before I create the Nodes. In some cases these…
Cracoras
  • 347
  • 3
  • 16