My app is currently using Titan 0.5.4 as its graph DB and does the following -
Parses a given raw data, then creates a vertex containing the parsed data, and also creates a unique identifier using a combination of the input data fields. Later on, when querying the graph, it re-creates the same unique identifier in order to check if data already exists (and fetching it).
I am currently working on a migration to Titan 1.0.0, and I cannot find a way to set vertex IDs as before.
How do you set a vertex ID on Titan 1.0.0?
A possible workaround is to create an indexed property (so-called id2), but it seems redundant to me.
Thanks
It seems the titan transaction still allowes you to provide an id when creating the vertex. Note, this might be a bug and might be removed in the next version. https://github.com/thinkaurelius/titan/blob/titan10/titan-core/src/main/java/com/thinkaurelius/titan/core/TitanTransaction.java
I think a reasonable way to solve this is to add a property key and composite index on each of your vertices and use that for your queries.