1

What's the default expansion policy in the variable expand case when using Memgraph?

When I have a query MATCH (x {id: 587})-[edge_list:Type *dfs..10]-(y {id: 963}) RETURN *; I'm using DFS algorithm. I explicitly tell to use DFS.

Which algorithm is used if I omit dsf: MATCH (x {id: 587})-[edge_list:Type *..10]-(y {id: 963}) RETURN *;? The result is the same. Does this mean that DFS is the default?

cybersam
  • 63,203
  • 6
  • 53
  • 76
EWoodAv
  • 15
  • 4

1 Answers1

1

The default relationship traversal algorithm in Memgraph is DFS (Depth First Search). This means that if you run:

MATCH (x {id: 587})-[edge_list:Type *..10]-(y {id: 963}) RETURN *;

the DFS will be run under the hood.

KateLatte
  • 611
  • 1
  • 12