通过neo4j REST API的密码配置文件 [英] cypher PROFILE via neo4j REST API
本文介绍了通过neo4j REST API的密码配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁能告诉我如何使用Neo4j REST API(例如)运行概要文件查询
Can anyone tell me how to run a PROFILE'd query using teh neo4j REST API such as
PROFILE MATCH (n:LABEL) return n;
当我使用RestCypherQueryEngine在Java中运行此代码时,甚至直接使用原始HTTP帖子运行时,都会得到
When I run this either in Java using the RestCypherQueryEngine or the even using a raw HTTP post directly I get
message: "Invalid input 'P': expected SingleStatement (line 1, column 1) "PROFILE MATCH (n:LABEL) return n;" ^"
exception: "SyntaxException"
尽管我在某处读过书,但这不仅可以通过服务器控制台来实现
I though I had read somewhere that this is possible not only through the server console
推荐答案
旧的cypher端点(即/db/data/cypher)具有一个?profile = true查询参数,该参数将概要分析信息添加到结果中.
The old cypher endpoint (i.e /db/data/cypher) had a ?profile=true query parameter that adds profiling information to the result.
例如
curl -H accept:application/json -H content-type:application/json
-d'{"query":"MATCH (n) RETURN count(*)","params":{}}'
http://localhost:7474/d/data/cypher?profile=true
{
"columns" : [ "count(*)" ],
"data" : [ [ 0 ] ],
"plan" : {
"args" : {
"returnItemNames" : [ "count(*)" ],
"_rows" : 1,
"_db_hits" : 0,
"symKeys" : [ " INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7" ]
},
"dbHits" : 0,
"name" : "ColumnFilter",
"children" : [ {
"args" : {
"keys" : [ ],
"_rows" : 1,
"aggregates" : [ "( INTERNAL_AGGREGATE75acebd9-82d7-4a65-921c-2049c4bde4e7,CountStar())" ],
"_db_hits" : 0
},
"dbHits" : 0,
"name" : "EagerAggregation",
"children" : [ {
"args" : {
"_rows" : 0,
"_db_hits" : 0,
"identifier" : "n"
},
"dbHits" : 0,
"name" : "AllNodes",
"children" : [ ],
"rows" : 0
} ],
"rows" : 1
} ],
"rows" : 1
}
}
这篇关于通过neo4j REST API的密码配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文