0

I set up a Neo4j instance (3.2) both on my local machine (with brew) and on a remote machine (with Docker). I'm trying to run a query, for which I use py2neo functions (merge on the relationship) which create the Cypher automatically.

I define two Node objects, one each for subject and object labels with entity as the property for both. I create a Relationship object with the relationship type (is cheaper according to in the query below) and add a property called confidence to this relationship type. This is the query I'm trying to run:

MERGE (a0:subject {entity:"VSS"})
SET a0:subject
MERGE (a1:object {entity:"Vanguard"})
SET a1:object
MERGE (a0)-[r0:`is cheaper according to`]->(a1) 
SET r0.confidence="1.0"
RETURN a1, a0, r0 LIMIT 1

This query works fine on my local Neo4j, but on the remote, I get the following error:

bolt.fetch S: FAILURE {u'message': u'Could not create token', u'code': u'Neo.DatabaseError.General.UnknownError'}

I tried running the above query directly in the browser client too, and had the same response, viz. it works on my local Neo4j but not my remote.

Further, if I replace the relationship type is cheaper according to with just is cheaper, the query fails both in my local and my remote Neo4j.

My setup for Neo4j on both is identical and pretty vanilla. I do have two indexes on each though, on the subject and object nodes.

I couldn't find anything to support differing behavior on the local v/s the remote, and I certainly couldn't see any reason why changing the relationship type would fail. Is there something I'm missing here?

Would really appreciate the help, thanks!

  • Not sure I completely understand. So you claim that the above with MERGE (a0)-[r0:`is cheaper`]->(a1) ... fails both locally and remotely using the Neo4j browser (not py2neo) ? Seems to work fine (and idempotent) for me. P.S. Stackoverflow is formatting with backticks, there are obviously backticks around "is cheaper". – Tom Geudens Aug 22 '17 at 09:01
  • This does not answer your question, but: the first 2 `SET` clauses should be removed, as they are just setting labels that already exist. – cybersam Aug 22 '17 at 19:33
  • do you see any detailed error in the log files? There should be a nested error? – Michael Hunger Sep 12 '17 at 22:42
  • Which exact version do you have? I tried it with 3.2.0 and 3.2.3 and worked in both cases. – Michael Hunger Sep 12 '17 at 22:44

0 Answers0