Get all unique labels

3,251 views
Skip to first unread message

Zahoor Mohamed J

unread,
Jan 20, 2015, 6:04:26 AM1/20/15
to gremli...@googlegroups.com
Hi 

I am a newbie to Gremlin...
How do i get all the Vertex labels in the graph?

./zahoor


Daniel Kuppitz

unread,
Jan 20, 2015, 7:59:25 AM1/20/15
to gremli...@googlegroups.com
gremlin> g.V().label().dedup() // get all unique labels
==>person
==>software
gremlin> g.V().label().groupCount() // count unique labels
==>[software:2, person:4]


Cheers,
Daniel


--
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/dd9a27e2-18ad-4752-a556-eb464880dc0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages