Question

I am trying to find vertices except for some specific ones and this query below doesnt work:

 g.V()
.has('someId')
.except([g.V().has('someId').has('some_other_filter')])

Is this usage of 'except' where I provide it a query within it not correct?

Thanks

Was it helpful?

Solution

You need to iterate your pipe:

g.V()
.has('someId')
.except(g.V().has('someId').has('some_other_filter').toList())

without dumping what's in your except to a list you are actually just passing a pipeline to except which won't ever evaluate against a vertex as true.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top