查询点数量、边数量

Hi, there

我记得看到之前的贴中有说到 1.x 并没有提供查询 点数量(所有/某个 tag)、边数量 的语句,那么我能否查询 storage 呢?如果可以的话能否提供参考文档呢?

想要的是 neo4j 的这个功能 https://neo4j.com/developer/kb/fast-counts-using-the-count-store/

谢谢。

通过storage的RPC接口是可以做的,可以参考我们vertex和edge的key设计进行key扫描。

1 个赞

Hi Shylock-Hg,

是这两个方法吗? https://github.com/vesoft-inc/nebula/blob/v1.0.1/src/interface/storage.thrift#L481-L482

是的

好,非常感谢。

参考这个例子。

2 个赞

已搞定 https://github.com/bk-rs/nebula-rs/blob/master/demos/async-std/src/count_vertex.rshttps://github.com/bk-rs/nebula-rs/blob/master/demos/async-std/src/count_edge.rs

3 个赞

您好 vkill 老师,@Milittle 作为开源之夏导师也在辅导学生贡献者做 nebulagraph rust 的工作,不知道是否方便和联系一下看看怎么避免重复工作哈?

我的 wechat id: sivvei

再次感谢 GitHub - bk-rs/nebula-rs: Nebula Graph Client API in Rust. 项目,非常酷!