问题
When I run a query like this:
g.V().hasLabel("myDefinedLabel").values("myKey").next()
It prints
20:46:30 WARN com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx -
Query requires iterating over all vertices [(~label = myDefinedLabel)].
For better performance, use indexes
So, I guess to solve this issue, I need to index the label. Is there anyway to do this?
I tried doing the normal procedure to create an index described here in Titan docs but the label is not a regular property key to index.
Assuming I want to create a composite index for labels, how to do it?
回答1:
Titan doesn't allow you to index labels, and according to the devs it isn't something they're interested in enabling.
来源:https://stackoverflow.com/questions/36295117/is-it-possible-to-index-labels-in-titan