How can I indicate which type of relationship to use as a function of the current node at each step of the traversal with neo4j?

I would like to go through my graph using the neo4j traversal API, but I need to specify which type of relationship to use at each step, and the type of relationship used should be a function of the current node. Is there any way to do this?

+3
source share
1 answer

in the current Traverser API you cannot select the exact ratio to go through. Instead, you take a more detailed approach of node.getRelationships (), choose the one you want, and end the onde on it, etc. Algo gets a little more detail than using Traverser, but gives you more flexibility. To follow, the Gremlin approach supports the concept of functions for selecting edges to move, see here . This will soon be implemented using Blueprint Pipes for Java-level performance.

NTN

/ peter neubauer

+1
source

Source: https://habr.com/ru/post/1736596/


All Articles