問題描述
我需要在 PHP 中運(yùn)行這種類型的查詢:
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)
單個頁面中有很多(~30).由于它使用 REST,因此運(yùn)行時間不適用(~5-10 秒).所以我試圖將它們分批發(fā)送,但我找不到任何方法來通過 REST 作為單批操作發(fā)送實際的密碼查詢.
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.
有辦法嗎?
推薦答案
您是否嘗試過以下方法?
Have you tried the following?
a) 交易休息資源
b) 批處理多次調(diào)用/db/data/cypher
資源通過 /db/data/batch
資源,在有效載荷中帶有 "to":"/cypher"
c) 傳遞集合而不是單個值作為參數(shù)
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
這篇關(guān)于Cypher 查詢作為 Neo4j 上的批處理操作的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!