l.chq
l.chq

Reputation: 13

how to specify the breadth-first strategy or the depth-first strategy in gremlin

The depth-first strategy is the default strategy in Gremlin unless specified otherwise.how to specify the breadth-first strategy?

gremlin language as follow:

    g.V().repeat(_,in('edgelabel').simplePath()).times(3).path()

Upvotes: 1

Views: 192

Answers (1)

Michael Pollmeier
Michael Pollmeier

Reputation: 1380

Currently when using repeat it defaults to BFS, which is unfortunate given that all other OLTP queries are DFS. There's a ticket to address that: https://github.com/apache/tinkerpop/pull/838

Upvotes: 1

Related Questions