Re: JanusGraphIndex how to retrieve constraint (indexOnly) specified for the global index?
Boxuan Li
You can do this:
toggle quoted message
Show quoted text
JanusGraphSchemaType constraint = ManagementSystem.getGraphIndexDirect("indexName", ((ManagementSystem) mgmt).getWrappedTx()).getSchemaTypeConstraint();
If (constraint == null) then there is no constraint. Otherwise constraint.name() returns your indexOnly label.
Best regards,
Boxuan
On Feb 25, 2021, at 2:43 PM, hadoopmarc@... wrote:Thanks. Still, my earlier answer remains unsatisfactory. Somehow, a new JanusGraph instance must be able to load an existing schema from the system table and have the information about label constraints available. Otherwise, the instance would not be able to index newly added vertices and edges correctly.
Best wishes, Marc