Neo4j的V2.0.0-M3 REST API批量插入 [英] neo4j v2.0.0-M3 REST API batch insert

查看:382
本文介绍了Neo4j的V2.0.0-M3 REST API批量插入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用批量插入添加使用RESY API我知道如何到2.0之前做到这一点的节点,但我现在开始使用标记的节点,我无法得到它的工作。我不觉得我怎么能在标签添加到节点。

I use batch insert for adding nodes using the RESY API I know how to do this before 2.0, but now I'm starting to use the labeled nodes, and I cant get it to work. I don't find how I can add the label to the node.

该文档是不是很清楚(我)。
http://docs.neo4j.org/chunked /2.0.0-M03/rest-api-node-labels.html

The documentation is not very clear (to me). http://docs.neo4j.org/chunked/2.0.0-M03/rest-api-node-labels.html

这就是发送到API的JSON:

This is the json that send to the API:

测试1:

[{"method":"POST",
  "to":"/node",
  "body":{"name":"A"},"id":0},
 {"method":"POST",
  "to":"{0}/labels",
  "body":{"label":"user"}
}] 

的Test2:

[{"method":"POST",
  "to":"/node",
  "body":{"name":"A"},"id":0},
 {"method":"POST",
  "to":"/node/{0}/labels",
  "body":{"label":"user"}
}] 

Test3的:

Test3:

[{"method":"POST",
  "to":"/node",
  "body":{"name":"A"},"id":0},
  "label":"user"
 }] 

在此先感谢
史蒂芬

thanks in advance Steven

推荐答案

什么是错误讯息,你得到什么?

What is the error message you get?

试试这个:

[{"method":"POST",
  "to":"/node",
  "body":{"name":"A"},"id":0},
 {"method":"POST",
  "to":"{0}/labels",
  "body":"user"}
] 

正如你可以看到机身只有标签字符串。

As you can see the body is only the label string.

这篇关于Neo4j的V2.0.0-M3 REST API批量插入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆