Cypher queries as batch operations on Neo4j

2019-04-09 03:54发布

I need to run this type of queries in PHP:

START n = node($thisUser), m = node($userId)
MATCH n-[r:RATED]->m
WHERE r.skillId = $id
RETURN id(r)

There are a lot of them for a single page (~30). Since it's using REST, the run-time comes out not applicable (~5-10 seconds). So I'm trying to send them in a single batch but I cannot find any method to send actual cypher queries through REST as operations in a single batch.

Is there a way to do it?

1条回答
可以哭但决不认输i
2楼-- · 2019-04-09 04:30

Have you tried the following?

a) the transactional rest resource
b) batching multiple calls to the /db/data/cypher resource via the /db/data/batch resource, with "to":"/cypher" in the payload
c) passing collections instead of single values as parameters

查看更多
登录 后发表回答