[英]How to fetch different number of vertices based on two different conditions in single titan vertex query in java
[英]filter vertices on number of outgoing edges in gremlin titan in java
我想使用java中的gremlin查询和过滤titan中具有超过500个向外边缘的所有顶点...我该怎么做?我已经开始如下
pipe=pipe.start(graph.getVertices());
然后,您需要一个过滤器功能
p.start(
g.getVertices()
.filter(new PipeFunction<Vertex,Boolean>() {
public Boolean compute(Vertex v) {
// write your logic here to count edges on the vertex and
// return true if over 500 and false otherwise
}));
在此处详细介绍在Java中使用GremlinPipeline
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.