Every example I've been able to find in the Titan documentation creates indices using the Rexster console. You log in to a single Titan node, create your indices and commit. After a while the whole cluster is aware of the index and it can be used.
I am wondering if there are other ways to do this. There are some benefits when creating indices from code e.g. in a Rexster extension: I use ENUMs for property keys and edge labels that offer toString
methods I can use on index creation. This way there is no worry about changed values.
Another aspect to mention is that I benchmark Titan and thus reinitialize the cluster quite often. It is more comfortable to let the code do all the work for me than logging in to a node and do it manually.
However, creating indices from code seems to be a mess and caused multiple exceptions when using an eventually-consistent storage backend. I think due to my simultaneous node startup multiple nodes tried to create the indices. See Titan node does not come up for details.
Is there a proper way of handling these issues? Are there further methods I am not aware of?