Re: How to duplicate a set(list) property values to another set property in the same vertex


Mitesh Patel <pal...@...>
 

Thanks a lot Daniel. Works like a charm.

- Mitesh


On Tuesday, August 7, 2018 at 10:15:10 PM UTC+5:30, Daniel Kuppitz wrote:
gremlin> g = TinkerGraph.open().traversal()
==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard]
gremlin> g.addV().property('foo','bar').property('foo','baz').addV().iterate()
gremlin> g.V().valueMap(true)
==>[label:vertex,foo:[bar,baz],id:0]
==>[label:vertex,id:3]
gremlin> g.V().has('foo').as('a').
           V().hasNot('foo').as('b').
           select('a').values('foo').as('foo').
           select('b').property(list, 'foo', select('foo')).iterate()
gremlin> g.V().valueMap(true)
==>[label:vertex,foo:[bar,baz],id:0]
==>[label:vertex,foo:[bar,baz],id:3]

Cheers,
Daniel


On Mon, Aug 6, 2018 at 9:11 PM, Mitesh Patel <p...@...> wrote:
Hi All,
I am trying to create a duplicate set property for my vertices from an original set property and want to store the same. Is there a way in gremlin server to set the properties in one or multi query?

- Regards,
Mitesh

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/de55ea54-aabe-4d2e-8547-54af644015da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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