Hi -
Each Vertex in my Graph has one label from the set "DC", "DS", "FC", "FL", "NL", and "ZIP".
What is the most efficient means to refer to the set of Vertexes with one of these labels? For example, I'd like to create edges from each Vertex with label "FC" to each Vertex with label "ZIP".
I have used indexes for vertex properties with great results but it's not clear to me if those are available for Vertex label. I see this example:
mgmt.buildIndex('byNameAndLabel', Vertex.class).addKey(name).indexOnly(god).buildCompositeIndex()
So, would I just omit the "addKey(...)" and use "indexOnly(...).buildCompositeIndex()" for each of the 6 different values of the vertex labels in my graph? E.g., like so:
mgmt.buildIndex('byDCLabel', Vertex.class).indexOnly(dc).buildCompositeIndex()mgmt.buildIndex('byDSLabel', Vertex.class).indexOnly(ds).buildCompositeIndex()mgmt.buildIndex('byFCLabel', Vertex.class).indexOnly(fc).buildCompositeIndex()
mgmt.buildIndex('byFLLabel', Vertex.class).indexOnly(fl).buildCompositeIndex()mgmt.buildIndex('byNLLabel', Vertex.class).indexOnly(nl).buildCompositeIndex()mgmt.buildIndex('byZIPLabel', Vertex.class).indexOnly(zip).buildCompositeIndex()
Intuitively this doesn't feel right in the absence of the property - it feels like there should be a single index where the label itself should be the "property".
Thanks in advance for any suggestions or advice.
jeff.