cypher Questions

10

Solved

We can delete all nodes and relationships by following query. MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r But newly created node get internal id as ({last node internal id} + 1) . It doesn't ...
Audient asked 26/4, 2014 at 11:20

5

Solved

I have a column in a csv that looks like this: I am using this code to test how the splitting of the dates is working: LOAD CSV WITH HEADERS FROM 'file:///..some_csv.csv' AS line WITH SPLIT(l...
Winterize asked 6/5, 2016 at 21:42

8

Solved

I would like to do a search, and I would like to start traversing from 2 labels (OR condition). For example, I need to find out all the nodes which have labels either 'Male' or 'Female' and whose p...
Placate asked 15/11, 2013 at 14:49

1

Background of problem I'm currently building an app that models various geographic features (roads, towns, highways, etc.) in a graph database. The geographic data is all in GeoJSON format. The...
Almatadema asked 13/3, 2017 at 16:38

2

Solved

Usually I can find everything I need already on SO but not this time. I'm looking for a very simple way to exclude labels, for example (pseudo code): match (n) where n not in (Label1, Label2) ret...
Lampert asked 28/9, 2015 at 6:44

3

I have a graph with 4 levels. While filtering using MATCH, how can i get the "degree" of a node? I am always getting a "degree" of 1. Here is my query: MATCH (k)-[r*]->(n:ABC) WITH k,r,n,count...
Infundibulum asked 25/9, 2015 at 5:29

3

I have a graph which has a hierarchy of categories in it (similar to product categories on a shopping site, e.g., Clothing --> Mens --> Shirts --> Short Sleeve --> ...). I have a few use cases wher...
Whatsoever asked 23/1, 2015 at 22:48

3

what is the status of the Neo4j's language Cypher? I really like it, but I would like to avoid the Neo4j lock-in. Are there some other Cypher interface like there are in Gremlin? Regards
Sherbrooke asked 21/9, 2012 at 6:32

7

Solved

I'm trying to create a query using cypher that will "Find" missing ingredients that a chef might have, My graph is set up like so: (ingredient_value)-[:is_part_of]->(ingredient) (ingredient) ...
Expand asked 8/6, 2012 at 16:4

3

Solved

Everyone familiar with MySQL has likely used the mysqldump command which can generate a file of SQL statements representing both the schema and data in a MySQL database. These SQL text files are co...
Creight asked 26/7, 2013 at 1:47

5

I am trying to build an database in Neo4j with a structure that contains seven different types of nodes, in total around 4-5000 nodes and between them around 40000 relationships. The cypher code i ...
Recognizee asked 28/4, 2014 at 9:2

5

Solved

I’m trying to use LOAD CSV to create nodes with the labels being set to values from the CSV. Is that possible? I’m trying something like: LOAD CSV WITH HEADERS FROM 'file:///testfile.csv' AS line ...
Scouring asked 28/7, 2014 at 10:12

3

I'm currently using the example data on console.neo4j.org to write a query that outputs hierarchical JSON. The example data is created with create (Neo:Crew {name:'Neo'}), (Morpheus:Crew {name:...
Beefeater asked 11/12, 2015 at 23:42

4

Solved

I need to delete some node properties from my graph. Following the cypher guidelines I have tried the following: START n=node(1) DELETE n.property RETURN n I get an error message: Expression `P...
Ferreira asked 2/8, 2013 at 6:54

3

Solved

Using Cypher, how can I find a node where a property doesn't exist? For example, I have two nodes: A = {foo: true, name: 'A'}, B = { name: 'B'} Now I'd like to find B, selecting it on the basis...
Mellie asked 15/2, 2016 at 2:36

4

Solved

Using Cypher how can I get all nodes in a graph? I am running some testing against the graph and I have some nodes without relationships so am having trouble crafting a query. The reason I want to...
Orthodontics asked 15/10, 2012 at 20:58

2

Solved

load csv with headers from 'file:///C:/Users/user/Desktop/Neo4J' as row Create (:State_Code {state_cd:row.st_cd}) I have tried this code and it is throwing an error as: Neo.ClientError.Statem...
Dissuasion asked 13/6, 2019 at 5:5

3

Solved

I understand that node and relationship properties are limited to primitive types or arrays of primitive types. The "Maps" section of the Neo4j 2.1 Reference Card mentions that: {name:'A...
Thirty asked 9/9, 2014 at 16:49

3

I would like to check whether a node exists using its name (instead of its ID). The Cypher query looks like : MATCH (c:Jaguar{name:"JLR 2.5Ltr"})-[:REPRESENTED_BY]->(v) RETURN c IS NOT NULL ...
Peggypegma asked 24/9, 2015 at 12:13

3

Solved

I'm trying to execute following query: MATCH (movie:Movie {title:"test"})-[r]-() DELETE movie, r to delete a :Movie node and all its relationships. It's all good, except if the query doesn't hav...
Auspicious asked 4/4, 2015 at 8:43

3

Solved

Neo4j has recently introduced call db.labels();, which yields all labels used in the database, presumably without the need to do a full scan. Is there something similar for property keys, ie, some...
Droopy asked 26/2, 2018 at 16:39

8

Solved

Is there a cypher command to drop all constraints? I know I can drop specific constraints. DROP CONSTRAINT ON (book:Book) ASSERT book.isbn IS UNIQUE However I want to clear all constraints as ...
Geer asked 12/3, 2014 at 16:10

7

I want to submit a list of semi-colon separated Cypher write statements via the web browser but I'm getting errors... MERGE (a:user{id: 'A'}) MERGE (b:product{id: '1'}) CREATE UNIQUE (a)-[:USED_...
Fulminous asked 6/12, 2013 at 9:12

2

Solved

I have some duplicate nodes, all with the label Tag. What I mean with duplicates is that I have two nodes with the same name property, example: { name: writing, _id: 57ec2289a90f9a2deece7e6d}, { n...
Blistery asked 15/3, 2017 at 2:37

4

Solved

I realized only after importing a ton of nodes that I had created relationships called START, which is a reserved keyword. Querying the DB through the Cypher console hence always complains about th...
Aker asked 11/12, 2012 at 8:55

© 2022 - 2024 — McMap. All rights reserved.