当我使用 POST / db / data / batch
时
[
{
"body" : {
"mark" : 0,
"userId" : 1
},
"id" : 1,
"method" : "POST",
"to" : "/node"
},
{
"body" : "SinaUserBean",
"method" : "POST",
"to" : "{1}/labels"
}
]
干得好!
但我使用 POST / db / data / batch
[
{
"body" : {
"key" : "userId",
"properties" : {
"mark" : 0,
"userId" : 1
},
"value" : 1
},
"id" : 1,
"method" : "POST",
"to" : "/index/node/SinaUserBean?uniqueness=get_or_create"
},
{
"body" : "SinaUserBean",
"method" : "POST",
"to" : "{1}/labels"
}
]
它将 500 返回
{
"exception" : "BatchOperationFailedException",
"fullname" : "org.neo4j.server.rest.domain.BatchOperationFailedException",
"message" : "",
"stacktrace" : [
"org.neo4j.server.rest.batch.NonStreamingBatchOperations.invoke(NonStreamingBatchOperations.java:63)",
"org.neo4j.server.rest.batch.BatchOperations.performRequest(BatchOperations.java:201)",
"org.neo4j.server.rest.batch.BatchOperations.parseAndPerform(BatchOperations.java:171)",
"org.neo4j.server.rest.batch.NonStreamingBatchOperations.performBatchJobs(NonStreamingBatchOperations.java:48)",
"org.neo4j.server.rest.web.BatchOperationService.batchProcess(BatchOperationService.java:126)",
"org.neo4j.server.rest.web.BatchOperationService.performBatchOperations(BatchOperationService.java:76)",
"java.lang.reflect.Method.invoke(Method.java:606)",
"org.neo4j.server.rest.transactional.TransactionalRequestDispatcher.dispatch(TransactionalRequestDispatcher.java:139)",
"org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112)",
"java.lang.Thread.run(Thread.java:724)"
]
}
我还想问一下 {id} 将被替换的内容,例如** / db / data / node / * realId ***或其他