Hello all,

I recently began exploring Neo4j REST interface, and I am having a problem
finding paths between nodes.
I am using neo4j-community-1.4.M03

My nodes and relationships look like this (verified using the webadmin
interface):

(1: Node A) ----IN----> (3: Node C) <----IN---- (2: Node B)

Using curl, I can query from node A to C:
----------------------------
$ curl -i -HAccept:application/json -HContent-Type:application/json -X POST
-d '{"to":"http://localhost:7474/db/data/node/3"}'
http://localhost:7474/db/data/node/1/path
HTTP/1.1 200 OK
Content-Length: 292
Content-Encoding: UTF-8
Content-Type: application/json
Access-Control-Allow-Origin: *
Server: Jetty(6.1.25)

{
  "start" : "http://localhost:7474/db/data/node/1";,
  "nodes" : [ "http://localhost:7474/db/data/node/1";, "
http://localhost:7474/db/data/node/3"; ],
  "length" : 1,
  "relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
  "end" : "http://localhost:7474/db/data/node/3";
}
----------------------------
I get similar results for querying for paths from B to C.

But when I try to get a path from A to B (which is through C), I get an
empty result set:
----------------------------
$ curl -HAccept:application/json -HContent-Type:application/json -i -X POST
-d '{"to":"http://localhost:7474/db/data/node/2"}'
http://localhost:7474/db/data/node/1/path
HTTP/1.1 404 Not Found
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=iso-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 1385
Server: Jetty(6.1.25)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /db/data/node/1/path. Reason:
<pre>    Not Found</pre></p><hr /><i><small>Powered by
Jetty://</small></i><br/>
<br/>
</body>
</html>
----------------------------

Querying "paths" from A to C returns a JSON encoded array containing the one
path, but "paths" from A to B returns an empty array ("[ ]").

Can anyone see anything wrong with my setup or the way I am querying?  This
seem like pretty basic functionality, so I'm assuming I'm just doing
something incorrectly.

Thanks in advance for any help!

-- Josh Adell
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to