Re: Condition where-inV-is does not work


HadoopMarc <bi...@...>
 

Hi Anton,

To compare objects you need the eq() predicate, not the is() step (see https://tinkerpop.apache.org/docs/current/reference/#a-note-on-predicates). Also note that JanusGraph uses RelationIdentifier objects as id's.
So, give the following a try (not tested):
g.V(110792).as('a').V(41099392).outE('LINK').where(inV().eq('a'))

Best wishes,    Marc

Op woensdag 16 december 2020 om 10:03:33 UTC+1 schreef Anton Eroshenko:

Thanks for reply.
In real query I don't have an ID, that's why I use traversal in where clause. Tried this one, but it does not work either:
g.V(41099392).outE('LINK').where(inV().hasId(V(110792).id()))

On Wednesday, December 16, 2020 at 1:45:50 AM UTC+7 Amiya wrote:

Try  g.V(41099392).outE('LINK').where(inV().hasId(110792))

On Tuesday, 15 December 2020 at 20:45:40 UTC+5:30 Anton Eroshenko wrote:

Hi, JanusGraph users.
I try a simple query from TinkerPop docs with my JanusGraph installation, but it does not work as expected. How is it possible:
gremlin> g.V(41099392).outE('LINK').inV()
==>v[110792]
==>v[81993864]
gremlin> g.V(41099392).outE('LINK').where(inV().is(V(110792)))
gremlin>

The last query returns nothing...
How to filter out vertices by traversal? Appreciate any help

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.