I'm trying to select a vertex based on the values of two of its (indexed) properties. The following works perfect in the gremlin-groovy shell:
gremlin> g.V().has('vlabel', 'truck_loc').V().has('vehicle_id', "3042").next()
This query finds a vertex that has the properties: vlabel = truck_loc and vehicle_id = 3042. It runs quickly.
In gremlin-python (version 3.3.4), using aiogremlin/goblin, the same query seems to run forever and uses up increasing amounts of memory:
truck_loc = await session.g.V().has('vlabel', 'truck_loc').V().has('vehicle_id', "3042").next()
However, the following query, without the second V()., returns None:
truck_loc = await session.g.V().has('vlabel', 'truck_loc').has('vehicle_id', "3042").next()
The backend for this graph is janusgraph/cassandra. The entire graph has millions of vertices and edges.
Does anyone know why the query won't work in gremlin-python, and how I might get it to work? Its there a better way to filter on multiple vertex properties?