1
我想遍歷一個具有相同關係的圖,但首先是傳出,其次是傳入(按此特定順序)。我發現遍歷器關係方向order neo4j java
traverse(Traverser.Order traversalOrder,
StopEvaluator stopEvaluator,ReturnableEvaluator returnableEvaluator,
RelationshipType firstRelationshipType,Direction firstDirection,
RelationshipType secondRelationshipType,Direction secondDirection)
我還沒有找到如何填寫traversalOrder stopEvaluator領域的任何例子,returnableEvaluator
我的示例代碼:
for (Path position : graphDb.traversalDescription()
.relationships(Wikilections_user.RelTypes.Voted, Direction.OUTGOING)
.relationships(Wikilections_user.RelTypes.Voted, Direction.INCOMING)
.evaluator(Evaluators.fromDepth(1))
.evaluator(Evaluators.toDepth(2))
.evaluator(Evaluators.includeWhereEndNodeIs(node2))
.uniqueness(Uniqueness.RELATIONSHIP_PATH)
//.evaluator(Evaluators.excludeStartPosition())
.traverse(node1)) {
我想改變部分.traverse( node1)),以便只返回首先遇到傳出的路徑,其次我遇到傳入的關係。 這怎麼可能?