⑴ Neo4j批量数据导入接口BatchInserters关系怎样建立

给你粘一段代码吧:
gbId=importer.createNode(node.pros,node.getAllLabels());//插入节点返回一个long gid
gid2Indexs(gbId, node);//将该gid放进索引中
idMap.put(node.getRequestId(), gbId);//我的程序中为了处理方便,维护了一个map
//创建关系的时候
String n1_requestId = rel.getRid_1();
String n2_requestId = rel.getRid_2();
Long n1Id = idMaps.get(n1_requestId);
Long n2Id = idMaps.get(n2_requestId);
RelationshipType type = rel.getType();
Map<String, Object> pros = rel.getRelPros();
if (null != n1Id && null != n2Id)
importer.createRelationship(n1Id, n2Id, type, pros);