![](/img/trans.png)
[英]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.