g.V().as("v1").V().where(P.within("v1")).by(__.values("records"))
g.V().limit(1).local(__.values("records")).as("r").
V().local(__.values("records")).as("r2").filter(__.where(P.within("r")))
g.V().as("v1").V().has("records",P.within(__.select("v1").values("records")))
gremlin> g = TinkerGraph.open().traversal()==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]gremlin> g.addV('v1').......1> property(list, 'records', 1).......2> property(list, 'records', 2).......3> property(list, 'records', 3).......4> addV('v2').......5> property(list, 'records', 2).......6> property(list, 'records', 5).......7> property(list, 'records', 6).......8> property(list, 'records', 4).......9> iterate()
gremlin> g.withComputer().......1> V().aggregate('v').as('a').......2> map(values('records').fold()).as('av').......3> select('v').unfold().as('b').......4> where(gt('a')).by(id).......5> not(where(out().as('a'))).......6> not(where(__.in().as('a'))).......7> filter(values('records').where(within('av'))).......8> select('a','b')==>[a:v[0],b:v[4]]
gremlin> g.V().aggregate('v').as('a').......1> map(values('records').fold()).as('av').......2> select('v').unfold().as('b').......3> where(gt('a')).by(id).......4> not(where(out().as('a'))).......5> not(where(__.in().as('a'))).......6> filter(values('records').where(within('av'))).......7> addE('link').......8> from('a').to('b')==>e[17][0-link->4]
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/d5881d2a-1071-4379-ad2b-2e3c06f4b297%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
Graph.traversal().withComputer(SparkGraphComputer.class)To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/10899365-b539-4e42-973d-f4452aa177ea%40googlegroups.com.
g.V().aggregate("v").as("a").
map(__.values("records")).fold()).as("av").
select("v").unfold().as("b").
where(P.gt("a")).by(__.id()).
filter(__.values("records").
where(P.within("av"))).select("a","b").next()
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/10899365-b539-4e42-973d-f4452aa177ea%40googlegroups.com.
Even on leaving out line 5 and 6 it still won't run, complaining that the id step of line 4 requires edges.
I didn't know how else to query for id in java
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/13235575-94b5-4528-9192-0a46118c0390%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/13235575-94b5-4528-9192-0a46118c0390%40googlegroups.com.
So it seems this works (by using T.id). However, I do not quite understand why.
In OLTP my version works fine. Do you know why this is?
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/a1f82aaa-e395-4d77-b3c6-f40b8146e836%40googlegroups.com.