How do I query Janus Graph to get all the vertices with a certain label?
This is the way I'm currently doing it. Where MAX
is simply some arbitrary constant of the maximum theoretical size of the graph.
graph.V().hasLabel("my-label").next(MAX)
The other alternative is next()
with no parameters but then I would have to iterate through using hasNext()
until hasNext()
is false. Is there any way to find all the vertices (return a list or array of type Vertex
) matching a certain label without having to artificially set the search ceiling?