Are the vertices always have integer IDs? Vertex ids are always like 12212
Are the edges always have UUID or string-like IDs? Edge ids are always like "16p-360-2dx-9jk"
Asked
Active
Viewed 225 times
2

canbax
- 3,432
- 1
- 27
- 44
-
Please see this answer https://stackoverflow.com/questions/67759285/edgeid-is-returned-as-alpha-numeric-instead-of-long-in-janusgraph/67776644?noredirect=1#comment121516046_67776644 – Kelvin Lawrence Aug 12 '21 at 13:48
-
what about vertex IDs? Should they always be integers? – canbax Aug 12 '21 at 14:25
-
1For now they are always LONG values. There is some interesting discussion here https://github.com/JanusGraph/janusgraph/issues/1221 – Kelvin Lawrence Aug 12 '21 at 14:37
-
I added an answer to try and summarize this conversation. – Kelvin Lawrence Aug 14 '21 at 12:46
1 Answers
3
The subject of how IDs are managed in JanusGraph seems to be a regular topic of confusion. It would probably good to add something to the official documentation that is easy to find a clearly describes the behavior.
Vertex IDs are LONG values. Currently you cannot supply a string or UUID as a vertex ID.
Edge IDs are handled a little differently using a RelationIdentifier as described in this answer: edgeID is returned as alpha numeric instead of long in Janusgraph

Kelvin Lawrence
- 14,674
- 2
- 16
- 38