Some days ago I posted a
question on SO about gremlin graph projections with titan, hopefully this will get an answer here.
The use case is pretty simple: I would like to create smaller graphs from a source graph by extracting implicit edges. For instance, say we have the following scenario (with different node types):
A -> B -> C -> D
Since the path from A to D exists, I would create in my new graph the nodes A and D and the edge between them. These paths can be found with a simple traversal, e.g.:
g.V().as('a').out('aTob').out('bToC').out('cToD').as('d').select('a', 'd');
The problem is that traversals not starting from a specific set of nodes imply a full graph scan since they do not use any kind of index, which is not desirable. Similar use cases may use the
subgraph step but it is not stated in the docs that these kind of queries are not performant (?).
I wonder what kind of actions/strategies can be followed so that this can be accomplished in an efficient way.
Best,