1

I'm using the traversal API to travers a graph which contains some hubs, i.e. nodes with many incoming/outcoming edges. I would like to traverse only some of them, for example 6000 and then stop. Traversing all of them is not an option for time reason and traversing non of them is also not an option. Does someone know if this is possible?

Thank you

D063520
  • 113
  • 6

1 Answers1

0

I don't know how willing you are do dig into the code and perhaps write your own branch selector (part of the traversal API). But I remember some implementation in neo4j-graph-algo component (org.neo4j.graphalgo.impl.util.LiteDepthFirstSelector), which does something like that, although it detects and merely defers those hub nodes (called super nodes in that class) till the end. I think it can easily be changed to stop traversing those hub nodes instead of deferring them. Would that help you?

Mattias Finné
  • 3,034
  • 1
  • 15
  • 7