Re: Index not being use

Chin Huang <chinhu...@...>

Please note "Graph indexes built against newly defined property keys, i.e. property keys that are defined in the same management transaction as the index, are immediately available. Graph indexes built against property keys that are already in use require the execution of a reindex procedure to ensure that the index contains all previously added elements. Until the reindex procedure has completed, the index will not be available." from

You might want to go through the reindex procedure.

On Fri, Aug 11, 2017 at 1:24 PM, Rohit Jain <rohit.j...@...> wrote:
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


You received this message because you are subscribed to the Google Groups "JanusGraph users list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Join { to automatically receive all group messages.