前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >JaunusGraph·创建索引

JaunusGraph·创建索引

作者头像
陈黎栋
发布2020-02-18 10:25:12
3980
发布2020-02-18 10:25:12
举报
文章被收录于专栏:陈黎栋的专栏啦

//4.Create Index String indexName1 = "ByObjectTypeAndName"; String indexName2 = "ByName"; PropertyKey propertyKey1 = mgmt.getPropertyKey("type_object_type"); PropertyKey propertyKey2 = mgmt.getPropertyKey("type_object_name");

EdgeLabel edgeLabel = mgmt.getEdgeLabel("type_object_type");

mgmt.buildEdgeIndex(edgeLabel,"edgeIndex_name",Direction.OUT,Order.incr,propertyKey2); mgmt.buildIndex(indexName2, Vertex.class).addKey(mgmt.getPropertyKey("name")).unique().buildCompositeIndex(); mgmt.buildIndex(indexName1, Vertex.class).addKey(propertyKey1).addKey(propertyKey2).buildCompositeIndex(); mgmt.commit(); //Wait for the index to become available ManagementSystem.awaitGraphIndexStatus(graph, indexName1).call(); ManagementSystem.awaitGraphIndexStatus(graph, indexName2).call();

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档