Hey Rob,
Filter by HasA condition, although I feel this could be renamed to 'A' for readability
g.E.as('edges').has('LEVEL', T.lte, 4.0).back('edges').has('LEVEL', T.gte, 2.0).back('edges').has('HasA', true).back('edges').has('HasB', true).back('edges').sort{it.LEVEL}._().inVThis query looks a little longer due to the back() steps. But it really helps when you're trying to achieve maintainability. Assume that your filter criteria are not fixed and can change over time. You might not want to go back and dig into your Gremlin query. Instead you could simply use a conditions Array and join them using back() steps at runtime. Later, when new conditions are added or existing ones are removed, it's just a matter of modifying your conditions Array!
Hi Marko,
I think so. A good guide to start with Gremlin Java for non-java developers will be very helful.
Thanks,
Pierre
Would people be interested in a blog post on Gremlin Java? What you can do in Gremlin Groovy can be done in Gremlin Java with the only drawback being that closures (e.g. filter{}) are represented as anonymous inner classes (e.g. filter(new PipeFunction<Vertex,Boolean>() { public Boolean compute(Vertex arg) { ... })).