I am new Gremlin and having trouble with filtering by property.
A -> B
Assume A and B are vertices and has edge between them with properties Created_on and deleted_on.
deleted_on property will be added only at the time of deletion.
How list by the edge property?
g.V(id).outE('Label').has('deleted_on', lt(timestamp.now())).outV().elementMap()
The above query returns empty, because the deleted_on property is not added to the edge yet.
How to handle this?
I'm not completely sure but I think you are looking to find all connections where the
deleted_onproperty is less thannowor it does not exist. If that is the case then you can use the or() and hasNot() steps in Gremlin to accomplish this similar to the query below.