I have 2 questions
1.If I have a graph like below
A->B->C->D
A->B->C->E
My requirement is to get the path (start to the very end) so I can traverse the nodes and perform some actions based on the criteria.
I'm using Traversal Description with uniqueness option as below. TraversalDescription td = Traversal.description() .relationships(KNOWS, Direction.OUTGOING) .uniqueness(Uniqueness.NODE_PATH) .evaluator(Evaluators.excludeStartPosition());
I'm expecting the below results
A->B->C->D
A->B->C->E
But I'm getting the below results. I tried both NODE_PATH and NODE_GLOBAL.
A->B
A->B->C
A->B->C->D
A->B->C->E
2.What is the most efficient way to clean up the old nodes which are no longer needed (based on time stamp)? I have 2 options 1.Traverse the node from start to end and collect the node ids that can be deleted. Then loop through the list and delete the node and it's relationships/nodes 2. Cypher-query to delete node and relationship matching the date criteria
Thanks a lot in advance!