문제

I want to query and filter all vertices with more than 500 outgoing edges in titan using gremlin in java...how do i do this?I have started off as below

    pipe=pipe.start(graph.getVertices());
도움이 되었습니까?

해결책

You then need a filter function

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
             }));

Using GremlinPipeline in Java is described more here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top