Reputation: 404
In JanusGraph, we can specify indexOnly(<label>)
for a composite index like this:
mgmt.buildIndex("myindex", Vertex.class).addKey(...).indexOnly(<label>).buildCompositeIndex()
When retrieving the composite index, how can we know whether it is an index for a specific label? I don't see any method available to retrieve this information:
JanusGraphIndex index = mgmt.getGraphIndex("myindex")
// How to retrieve indexOnly details?
Thanks,
Upvotes: 1
Views: 56
Reputation: 1581
Good news, this got fixed in the upcoming v0.6.0 release of JanusGraph (already available as prerelease at https://github.com/JanusGraph/janusgraph/releases/tag/v0.6.0).
See the mgmt.getIndexOnlyConstraint(indexName) method at: https://github.com/JanusGraph/janusgraph/blob/v0.6.0/janusgraph-core/src/main/java/org/janusgraph/core/schema/JanusGraphManagement.java
Upvotes: 2