Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple CREATE INDEX ON in one cypher query

Tags:

neo4j

cypher

Using the browser in 2.0, is there a way to create multiple Cypher queries using CREATE INDEX ON?

CREATE INDEX ON :Manufacturer(name)
CREATE INDEX ON :Brand(name)

which just returns an un-informative "syntax error" in the browser.

Tried as well:

CREATE INDEX ON :Manufacturer(name);
CREATE INDEX ON :Brand(name);

Even tried ',', the only way this works is by cut/paste each line, appears to be no way to combine them into one script, rather long and pointless as I'm sure there is a way of combining them. No?

like image 566
Andrew Lank Avatar asked Jan 03 '14 00:01

Andrew Lank


People also ask

How many nodes can a single relationship connect?

A relationship connects two nodes — a start node and an end node. Just like nodes, relationships can have properties. Relationships between nodes are a key part of a graph database.

What is unwind in Neo4j?

UNWIND expands a list into a sequence of rows.

What Cypher clauses can you use to create a node?

The CREATE clause is used to create nodes and relationships.


1 Answers

Nope, you have to do them separately.

Update as of late 2018: in one of the recent releases (3.4 or 3.5, I think), they added a new option in the browser to "enable multi-statement query editor", which lets you do multiple statements at once.

like image 86
Eve Freeman Avatar answered Oct 01 '22 16:10

Eve Freeman