设为首页 加入收藏

TOP

Neo4j创建自动索引(二)
2015-07-16 12:56:32 来源: 作者: 【 】 浏览:9
Tags:Neo4j 创建 自动 索引
t(MediaType.APPLICATION_JSON)
? ? ? ? ? ? ? ? .type(MediaType.APPLICATION_JSON)
? ? ? ? ? ? ? ? .get(ClientResponse.class);


? ? ? ? System.out.println(response.getStatus());
? ? ? ? System.out.println(response.getEntity(String.class));
? ? ? ? response.close();
? ? }
? ?
? ? public static void GetRelationshipByAutoIndex(String ki)
? ? {
//? ? ? ? String txUri=SERVER_ROOT_URI+"index/node/node_auto_index/name/"+ki;
? ? ? ? String txUri=SERVER_ROOT_URI+"index/auto/relationship/ki/"+ki;
? ? ? ? WebResource resource = Client.create().resource(txUri);
? ? ? ?
? ? ? ? ClientResponse response = resource.accept(MediaType.APPLICATION_JSON)
? ? ? ? ? ? ? ? .type(MediaType.APPLICATION_JSON)
? ? ? ? ? ? ? ? .get(ClientResponse.class);


? ? ? ? System.out.println(response.getStatus());
? ? ? ? System.out.println(response.getEntity(String.class));
? ? ? ? response.close();
? ? }


关系的输出结果为:


[ {
? "extensions" : { },
? "metadata" : {
? ? "id" : 337,
? ? "type" : "家人"
? },
? "data" : {
? ? "name" : "无",
? ? "ki" : "1234567890"
? },
? "property" : "http://192.168.209.128:7474/db/data/relationship/337/properties/{key}",
? "start" : "http://192.168.209.128:7474/db/data/node/171391",
? "self" : "http://192.168.209.128:7474/db/data/relationship/337",
? "end" : "http://192.168.209.128:7474/db/data/node/171392",
? "type" : "家人",
? "properties" : "http://192.168.209.128:7474/db/data/relationship/337/properties"
} ]


这里说明一下,传值为中文的时候,查询不出来,可能需要编码,因为工作暂时没有用到,就没有再研究了


?


?


Neo4J图数据库实践系列


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇顺时针打印矩阵 下一篇插入排序算法的Java实现

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: