gremlin> g.V().hasLabel('GROUP').where(__.outE().hasLabel("PART_OF").count().is(eq(0))).explain()
==>Traversal Explanation
==================================================================================================================================================================================================
Original Traversal [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
ConnectiveStrategy [D] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
IdentityRemovalStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
IncidentToAdjacentStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
AdjacentToIncidentStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
FilterRankingStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
MatchPredicateStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
RepeatUnrollStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), HasStep([~label.eq(PART_OF)]), CountGlobalStep, IsStep(eq(0))])]
RangeByIsCountStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
PathRetractionStrategy [O] [GraphStep(vertex,[]), HasStep([~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
TinkerGraphStepStrategy [P] [TinkerGraphStep(vertex,[~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
ProfileStrategy [F] [TinkerGraphStep(vertex,[~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
StandardVerificationStrategy [V] [TinkerGraphStep(vertex,[~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
Final Traversal [TinkerGraphStep(vertex,[~label.eq(GROUP)]), TraversalFilterStep([VertexStep(OUT,edge), NotStep(![HasStep([~label.eq(PART_OF)])])])]
arikc note that the workaround for now would be to write your traversal as:
Looks like a bug in the traversal strategies:
NotStep shoudl be wrapped around VertexStep and HasStep. It should generate this: