Index not being use

Rohit Jain <rohit.j...@...>

Hi folks,

So I created an index like so:

gremlin> graph.tx().rollback()
gremlin> mgmt = graph.openManagement()
gremlin> personid = mgmt.getPropertyKey('personid')
gremlin> mgmt.buildIndex('personid', Vertex.class).addKey(personid).unique().buildCompositeIndex()
gremlin> mgmt.commit()

Then I do a query like so, and it gives me a warning that I should use indexes.  Isn't the index use not implicit?  Do I have to do anything specific for it to use the index I just created?

gremlin> g.V().has('personid','640').out('role').inE('role').has('roletype',eq("director")).outV().values('personid')
13:14:45 WARN  org.janusgraph.graphdb.transaction.StandardJanusGraphTx  - Query requires iterating over all vertices [(personid = 640)]. For better performance, use indexes


Join { to automatically receive all group messages.