I'm using Gremlin, and I've got these two queries that return different results and I can't understand why.
gremlin> g.V().
hasLabel('person').
has('person','personId', 'd6688539-7773-4126-93bf-bb8ef979e25a').
bothE('is').
otherV().
hasLabel('face').
bothE('is similar').
not(inV().bothE('is')).
otherV().dedup().
count()
==>3
gremlin> g.V().
hasLabel('person').
has('person','personId', 'd6688539-7773-4126-93bf-bb8ef979e25a').
as('person').
project('personId','name','count').
by('personId').
by('name').
by(
bothE('is').
otherV().
hasLabel('face').
bothE('is similar').
not(inV().bothE('is')).
otherV().dedup().
count()
)
==>{personId=d6688539-7773-4126-93bf-bb8ef979e25a, name=Shawn, count=1}
Why do they return different results? And what do I need to do to the bottom query to get it to correctly return 3?