Sourav048
Sourav048

Reputation: 332

Add more than one evaluator in NEO4J

How can i add more than one evaluator? For Example -

TraversalDescription TRAVERSAL = Traversal.description()
.breadthFirst()
.evaluator(Evaluators.excludeStartPosition());

I also want to add

Evaluators.toDepth(2)

How can i do it?

In other words i want to create a list of evaluators.

Upvotes: 0

Views: 61

Answers (1)

James
James

Reputation: 12182

Just add the evaluator with another call to the evaluator() method like:

TraversalDescription TRAVERSAL = Traversal.description()
.breadthFirst()
.evaluator(Evaluators.excludeStartPosition())
.evaluator(Evaluators.toDepth(2));

Upvotes: 1

Related Questions