Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get a list of indexed keys in Titan?

Tags:

gremlin

titan

I am using Titan v0.3.1 and would like to see a list of which keys I have already indexed via createKeyIndex. How can I do this?

like image 293
bcm360 Avatar asked Aug 28 '13 19:08

bcm360


Video Answer


1 Answers

In the Gremlin shell, you can use Blueprints' KeyIndexableGraph getIndexedKeys function:

gremlin> g.getIndexedKeys(Vertex.class)
==>my_key_1
==>my_key_2
==>my_key_3

(my_key_1, my_key_2, and my_key_3 are the 3 indexed vertex keys)

To grab the indexes for keys on edges, use Edge.class in place of Vertex.class above.

like image 149
bcm360 Avatar answered Dec 19 '22 20:12

bcm360