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 ...
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...
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...
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...
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...
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...
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...
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
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) ...
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...
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 ...
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
...
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:...
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...
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...
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...
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...
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...
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...
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...
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 ...
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_...
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...
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.