--
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/f7179aaf-4f3f-47c0-beb7-5dd4be1b7d08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
g.V().properties().unfold().group().by(key).by(value).unfold().project('k','v').by(keys).by(local(select(values).unfold().group().by().by(count()).order(local).by(values,decr).unfold().limit(1).select(keys)))==>[k:course,v:A]==>[k:id,v:student2]==>[k:type,v:student]==>[k:class,v:X]==>[k:age,v:20]Robert Dale
On Thu, Jun 21, 2018 at 2:12 AM Udit Sharma <ushar...@gmail.com> wrote:
--Sample Graphg=TinkerGraph.open().traversal()g.addV().property('type','student').property('id','student1').property('age','20').property('course','A').property('class','X'). addV().property('type','student').property('id','student2').property('age','20').property('course','A').property('class','Y')Find the properties which are common among the nodes having id as 'student1' and 'student2'.Expected Output[key:course,value:A][key:type, value:student][key:age, value:20]
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-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/f7179aaf-4f3f-47c0-beb7-5dd4be1b7d08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CABed_4rmN45-C77dFcKeWXLyrS0cDF_8MrW%2BHoiH6U%3D_L%3DxOBg%40mail.gmail.com.To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-users+unsubscribe@googlegroups.com.
Thanks Robert,But, the expected output is different from the actual output. Let me rephrase the problem again. Given id of two nodes as 'student1' and 'student2', find the properties where both the key and value pair matches. So in this case, the traversal should not generate [k:id,v:student2] and [k:class,v:X] as class and id are different for student1 and student2.Also assume that graph may have more than two nodes.
On Thu, Jun 21, 2018 at 4:25 PM, Robert Dale <rob...@gmail.com> wrote:
g.V().properties().unfold().group().by(key).by(value).unfold().project('k','v').by(keys).by(local(select(values).unfold().group().by().by(count()).order(local).by(values,decr).unfold().limit(1).select(keys)))==>[k:course,v:A]==>[k:id,v:student2]==>[k:type,v:student]==>[k:class,v:X]==>[k:age,v:20]Robert Dale
On Thu, Jun 21, 2018 at 2:12 AM Udit Sharma <ushar...@gmail.com> wrote:
--Sample Graphg=TinkerGraph.open().traversal()g.addV().property('type','student').property('id','student1').property('age','20').property('course','A').property('class','X'). addV().property('type','student').property('id','student2').property('age','20').property('course','A').property('class','Y')Find the properties which are common among the nodes having id as 'student1' and 'student2'.Expected Output[key:course,value:A][key:type, value:student][key:age, value:20]
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/f7179aaf-4f3f-47c0-beb7-5dd4be1b7d08%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/CABed_4rmN45-C77dFcKeWXLyrS0cDF_8MrW%2BHoiH6U%3D_L%3DxOBg%40mail.gmail.com.
--Thanks and RegardsUdit SharmaMTech CSE, IITR
--
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/CAJtjf0Mn3bjL7v0ZBP2Yhpbz5Oyhb9D8Wj091WdhYP9a2Qv_wg%40mail.gmail.com.