lllllllllllll
lllllllllllll

Reputation: 9110

Producing subgraph when querying through the neo4j web interface

I am a newbie to neo4j, and basically I am trying to produce a subgraph from the whole graph according to certain rules. However, my current output does not meet what I want.

Suppose I have four nodes on the graph, which are A, B, C, D, and they are connected as:

A -- B
B -- C
C -- D

Basically I want to acquire a subgraph (or I would say it is two traces), consisting 4 nodes, and two edges:

A -- B
C -- D

However, when I use a Cypher code to query through the neo4j web interface, I always got the whole graph.. That means, I always get a graph with 4 nodes and three edges.

The Cypher query is something like below:

MATCH (n)-[r]-(m) where n.id = "ID_A" and m.id = "ID_B" 
UNION
MATCH (n)-[r]-(m) where n.id = "ID_C" and m.id = "ID_D" 

To be more specific, for the above query, I wish I can a subgraph with two traces, however, all three edges are shown in the output, connecting these four nodes.

Am I clear? Could anyone give me some help on how to produce the subgraph? Thank you!

Upvotes: 1

Views: 57

Answers (1)

stdob--
stdob--

Reputation: 29172

It looks like the auto-completion option works. Disable it in the browser interface.

[ http://neo4j.com/developer/guide-neo4j-browser/ ]

Upvotes: 2

Related Questions