簡體   English   中英

在java中的gremlin titan中過濾出頂點數量上的頂點

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM