Imagine I have vertices with properties whose values are lists, e.g:
g.addV('v').property('prop',['a','b','c'])
How do I find cases where prop contains a certain value?
This seemed the obvious thing to try:
g.V().has(P.within('prop'),'a')
But it doesn't work:
gremlin_python.driver.protocol.GremlinServerError: 599: Could not locate method: DefaultGraphTraversal.has([within([a]), test])
If you use the VertexProperty list cardinality (see multi-properties in the docs), you can accomplish it like this:
Note that
list_is coming from an enum viafrom gremlin_python.process.traversal import Cardinality.