Re: filtering a path


Daniel Kuppitz <me@...>
 

even those in between start and end

Does that mean you want to exclude the whole path or only matching vertices on the path? If the latter, then what about the edges? Taking out a single vertex leaves 2 invalid edges on the path.
If the former, then it's:

...repeat(outE().inV().has("num", gt(50)).simplePath())...

Cheers,
Daniel
 

On Wed, Aug 30, 2017 at 6:34 AM, <yair...@...> wrote:
What's the best way to filter a path based on a Vertex property.

I am using the gremlin-scala lib.

This is the code:

val paths = startVertex.asScala().start()
      .repeat(_.outE().inV().simplePath())
      .until(_.is(endVertex.vertex))
      .path()
      .toList()


This works great. Now I want to add a filter that will filter out any Vertexes (even those in between start and end) in the path where property("num") > 50.

Seems that the filter API is only for the End Vertex? 

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.